diff options
author | 2016-11-01 11:05:02 -0700 | |
---|---|---|
committer | 2016-11-01 11:05:02 -0700 | |
commit | eaf796400169786c33a438c56c41a46d8ed45b02 (patch) | |
tree | 748f3ea2070ad4771db1d3ae5f0a21c59329db9d /tools/run_tests/run_tests.py | |
parent | cb4b2b5d7dc1699a709ffce8b96a3920bd39f8eb (diff) |
Add test scripts for electron
Diffstat (limited to 'tools/run_tests/run_tests.py')
-rwxr-xr-x | tools/run_tests/run_tests.py | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index db261d98c2..70da0cc0e3 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -362,19 +362,31 @@ class NodeLanguage(object): def configure(self, config, args): self.config = config self.args = args + # Note: electron ABI only depends on major and minor version, so that's all + # we should specify in the compiler argument _check_compiler(self.args.compiler, ['default', 'node0.12', - 'node4', 'node5', 'node6']) + 'node4', 'node5', 'node6', + 'electron1.3']) if self.args.compiler == 'default': self.node_version = '4' else: - # Take off the word "node" - self.node_version = self.args.compiler[4:] + if self.args.compiler.startswith('electron'): + self.runtime = 'electron' + self.node_version = self.args.compiler[8:] + else: + self.runtime = 'node' + # Take off the word "node" + self.node_version = self.args.compiler[4:] def test_specs(self): if self.platform == 'windows': return [self.config.job_spec(['tools\\run_tests\\run_node.bat'], None)] else: - return [self.config.job_spec(['tools/run_tests/run_node.sh', self.node_version], + run_script = 'run_node' + if self.runtime == 'electron': + run_script += '_electron' + return [self.config.job_spec(['tools/run_tests/{}.sh'.format(run_script), + self.node_version], None, environ=_FORCE_ENVIRON_FOR_WRAPPERS)] @@ -382,7 +394,10 @@ class NodeLanguage(object): if self.platform == 'windows': return [['tools\\run_tests\\pre_build_node.bat']] else: - return [['tools/run_tests/pre_build_node.sh', self.node_version]] + build_script = 'pre_build_node' + if self.runtime == 'electron': + build_script += '_electron' + return [['tools/run_tests/{}.sh'.format(build_script), self.node_version]] def make_targets(self): return [] @@ -394,7 +409,12 @@ class NodeLanguage(object): if self.platform == 'windows': return [['tools\\run_tests\\build_node.bat']] else: - return [['tools/run_tests/build_node.sh', self.node_version]] + build_script = 'build_node' + if self.runtime == 'electron': + build_script += '_electron' + # building for electron requires a patch version + self.node_version += '.0' + return [['tools/run_tests/{}.sh'.format(build_script), self.node_version]] def post_tests_steps(self): return [] @@ -1016,6 +1036,8 @@ argp.add_argument('--compiler', 'clang3.4', 'clang3.5', 'clang3.6', 'clang3.7', 'vs2010', 'vs2013', 'vs2015', 'python2.7', 'python3.4', 'python3.5', 'python3.6', 'pypy', 'pypy3', + 'node0.12', 'node4', 'node5', 'node6', + 'electron1.3', 'coreclr'], default='default', help='Selects compiler to use. Allowed values depend on the platform and language.') |