Skip to content
Snippets Groups Projects
Commit 2c8d5165 authored by murgatroid99's avatar murgatroid99
Browse files

Added node test runner

parent 6dc549e9
No related branches found
No related tags found
No related merge requests found
#!/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): ...@@ -46,8 +46,8 @@ class CLanguage(object):
self.make_target = make_target self.make_target = make_target
with open('tools/run_tests/tests.json') as f: with open('tools/run_tests/tests.json') as f:
js = json.load(f) js = json.load(f)
self.binaries = [tgt['name'] self.binaries = [tgt['name']
for tgt in js for tgt in js
if tgt['language'] == test_lang] if tgt['language'] == test_lang]
def test_binaries(self, config): def test_binaries(self, config):
...@@ -59,6 +59,19 @@ class CLanguage(object): ...@@ -59,6 +59,19 @@ class CLanguage(object):
def build_steps(self): def build_steps(self):
return [] 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): class PhpLanguage(object):
...@@ -107,6 +120,7 @@ _DEFAULT = ['dbg', 'opt'] ...@@ -107,6 +120,7 @@ _DEFAULT = ['dbg', 'opt']
_LANGUAGES = { _LANGUAGES = {
'c++': CLanguage('cxx', 'c++'), 'c++': CLanguage('cxx', 'c++'),
'c': CLanguage('c', 'c'), 'c': CLanguage('c', 'c'),
'node': NodeLanguage(),
'php': PhpLanguage(), 'php': PhpLanguage(),
'python': PythonLanguage(), 'python': PythonLanguage(),
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment