summaryrefslogtreecommitdiff
path: root/scripts/test
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-10-17 15:28:50 -0700
committerGitHub <noreply@github.com>2019-10-17 15:28:50 -0700
commit83f61457fd10feffe8cdcc6c278bc79cfb1667aa (patch)
treedf91c62937fd8a17fc132b703c7ca3a973b4be3d /scripts/test
parent1abfe595aae2baa68c2888e53ac7f2890f9a75b5 (diff)
downloadbinaryen-83f61457fd10feffe8cdcc6c278bc79cfb1667aa.tar.gz
binaryen-83f61457fd10feffe8cdcc6c278bc79cfb1667aa.tar.bz2
binaryen-83f61457fd10feffe8cdcc6c278bc79cfb1667aa.zip
Add --out-dir to allow setting the test output dir. (#2389)
This allows fuzzing in parallel invocations.
Diffstat (limited to 'scripts/test')
-rw-r--r--scripts/test/shared.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py
index 921da1f7f..8d30ecaa0 100644
--- a/scripts/test/shared.py
+++ b/scripts/test/shared.py
@@ -58,6 +58,11 @@ def parse_args(args):
help=('Specifies a path to the root of the Binaryen repository tree.'
' Default: the directory where this file check.py resides.'))
parser.add_argument(
+ '--out-dir', dest='out_dir', default='',
+ help=('Specifies a path to the output directory for temp files, which '
+ 'is also where the test runner changes directory into.',
+ ' Default:. out/test under the binaryen root.'))
+ parser.add_argument(
'--valgrind', dest='valgrind', default='',
help=('Specifies a path to Valgrind tool, which will be used to validate'
' execution if specified. (Pass --valgrind=valgrind to search in'
@@ -124,10 +129,12 @@ if not options.binaryen_root:
options.binaryen_test = os.path.join(options.binaryen_root, 'test')
-test_out = os.path.join(options.binaryen_root, 'out', 'test')
-if not os.path.exists(test_out):
- os.makedirs(test_out)
-os.chdir(test_out)
+if not options.out_dir:
+ options.out_dir = os.path.join(options.binaryen_root, 'out', 'test')
+
+if not os.path.exists(options.out_dir):
+ os.makedirs(options.out_dir)
+os.chdir(options.out_dir)
# Finds the given executable 'program' in PATH.