diff options
author | Stefan Budeanu <stefan@budeanu.com> | 2016-02-22 21:55:35 -0500 |
---|---|---|
committer | Michael Dawson <michael_dawson@ca.ibm.com> | 2016-02-25 14:28:39 -0500 |
commit | 23a584d5177f0dd24fe427ae7429433b385e1451 (patch) | |
tree | 93ab913b109ffe6734f9eb08372af5d84ae8c11c /tools/test.py | |
parent | 7e51966b3238588398c08b7849fe92ca26e956dd (diff) | |
download | android-node-v8-23a584d5177f0dd24fe427ae7429433b385e1451.tar.gz android-node-v8-23a584d5177f0dd24fe427ae7429433b385e1451.tar.bz2 android-node-v8-23a584d5177f0dd24fe427ae7429433b385e1451.zip |
test: allow passing args to executable
Add --node-args option that will pass arguments.
PR-URL: https://github.com/nodejs/node/pull/5376
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'tools/test.py')
-rwxr-xr-x | tools/test.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/test.py b/tools/test.py index 217e72b870..a1401589c9 100755 --- a/tools/test.py +++ b/tools/test.py @@ -709,6 +709,7 @@ class TestRepository(TestSuite): (file, pathname, description) = imp.find_module('testcfg', [ self.path ]) module = imp.load_module('testcfg', file, pathname, description) self.config = module.GetConfiguration(context, self.path) + self.config.additional_flags = context.node_args finally: if file: file.close() @@ -774,11 +775,13 @@ TIMEOUT_SCALEFACTOR = { class Context(object): - def __init__(self, workspace, buildspace, verbose, vm, timeout, processor, suppress_dialogs, store_unexpected_output): + def __init__(self, workspace, buildspace, verbose, vm, args, timeout, + processor, suppress_dialogs, store_unexpected_output): self.workspace = workspace self.buildspace = buildspace self.verbose = verbose self.vm_root = vm + self.node_args = args self.timeout = timeout self.processor = processor self.suppress_dialogs = suppress_dialogs @@ -1281,6 +1284,8 @@ def BuildOptions(): result.add_option("--snapshot", help="Run the tests with snapshot turned on", default=False, action="store_true") result.add_option("--special-command", default=None) + result.add_option("--node-args", dest="node_args", help="Args to pass through to Node", + default=[], action="append") result.add_option("--valgrind", help="Run tests through valgrind", default=False, action="store_true") result.add_option("--cat", help="Print the source of the tests", @@ -1471,6 +1476,7 @@ def Main(): buildspace, VERBOSE, shell, + options.node_args, options.timeout, processor, options.suppress_dialogs, |