summaryrefslogtreecommitdiff
path: root/scripts/test
diff options
context:
space:
mode:
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.