diff options
author | murgatroid99 <michael.lumish@gmail.com> | 2015-01-26 10:41:21 -0800 |
---|---|---|
committer | murgatroid99 <michael.lumish@gmail.com> | 2015-01-26 10:41:21 -0800 |
commit | 2c8d5165a6ed9f55818af5f7e9e07d7851fc030d (patch) | |
tree | 019674e65c24589d3b9f90d0ea6687d2bbbcd633 /tools | |
parent | 6dc549e9af8a9339bee336140b8087d610e53ed7 (diff) |
Added node test runner
Diffstat (limited to 'tools')
-rw-r--r-- | tools/run_tests/run_node.sh | 10 | ||||
-rwxr-xr-x | tools/run_tests/run_tests.py | 18 |
2 files changed, 26 insertions, 2 deletions
diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh new file mode 100644 index 0000000000..76f8a1a4f4 --- /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 da849f04cb..141f1117ab 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(), } |