diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh new file mode 100644 index 00000000000..76f8a1a4f4e --- /dev/null +++ b/tools/run_tests/run_node.sh @@ -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 diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index da849f04cb0..141f1117ab9 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -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(), }