@@ -57,6 +57,11 @@ def parse_args(args):
5757 '--binaryen-root' , dest = 'binaryen_root' , default = '' ,
5858 help = ('Specifies a path to the root of the Binaryen repository tree.'
5959 ' Default: the directory where this file check.py resides.' ))
60+ parser .add_argument (
61+ '--out-dir' , dest = 'out_dir' , default = '' ,
62+ help = ('Specifies a path to the output directory for temp files, which '
63+ 'is also where the test runner changes directory into.' ,
64+ ' Default:. out/test under the binaryen root.' ))
6065 parser .add_argument (
6166 '--valgrind' , dest = 'valgrind' , default = '' ,
6267 help = ('Specifies a path to Valgrind tool, which will be used to validate'
@@ -124,10 +129,12 @@ def warn(text):
124129
125130options .binaryen_test = os .path .join (options .binaryen_root , 'test' )
126131
127- test_out = os .path .join (options .binaryen_root , 'out' , 'test' )
128- if not os .path .exists (test_out ):
129- os .makedirs (test_out )
130- os .chdir (test_out )
132+ if not options .out_dir :
133+ options .out_dir = os .path .join (options .binaryen_root , 'out' , 'test' )
134+
135+ if not os .path .exists (options .out_dir ):
136+ os .makedirs (options .out_dir )
137+ os .chdir (options .out_dir )
131138
132139
133140# Finds the given executable 'program' in PATH.
0 commit comments