From 83f61457fd10feffe8cdcc6c278bc79cfb1667aa Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 17 Oct 2019 15:28:50 -0700 Subject: Add --out-dir to allow setting the test output dir. (#2389) This allows fuzzing in parallel invocations. --- scripts/test/shared.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'scripts/test') 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 @@ -57,6 +57,11 @@ def parse_args(args): '--binaryen-root', dest='binaryen_root', default='', 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' @@ -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. -- cgit v1.2.3