Added node test runner

pull/213/head
murgatroid99 10 years ago
parent 6dc549e9af
commit 2c8d5165a6
  1. 10
      tools/run_tests/run_node.sh
  2. 18
      tools/run_tests/run_tests.py

@ -0,0 +1,10 @@
#!/bin/bash
set -ex
# change to grpc repo root
cd $(dirname $0)/../..
root=`pwd`
$root/src/node/node_modules/mocha/bin/mocha $root/node/test

@ -46,8 +46,8 @@ class CLanguage(object):
self.make_target = make_target
with open('tools/run_tests/tests.json') as f:
js = json.load(f)
self.binaries = [tgt['name']
for tgt in js
self.binaries = [tgt['name']
for tgt in js
if tgt['language'] == test_lang]
def test_binaries(self, config):
@ -59,6 +59,19 @@ class CLanguage(object):
def build_steps(self):
return []
class NodeLanguage(object):
def __init__(self):
self.allow_hashing = False
def test_binaries(self, config):
return ['tools/run_tests/run_node.sh']
def make_targets(self):
return []
def build_steps(self):
return [['tools/run_tests/build_node.sh']]
class PhpLanguage(object):
@ -107,6 +120,7 @@ _DEFAULT = ['dbg', 'opt']
_LANGUAGES = {
'c++': CLanguage('cxx', 'c++'),
'c': CLanguage('c', 'c'),
'node': NodeLanguage(),
'php': PhpLanguage(),
'python': PythonLanguage(),
}

Loading…
Cancel
Save