55
66
77def _mutateCommandLine (context , commandline ):
8- timefile = context .tmpBase + ".time"
8+ timefile = os . path . normpath ( context .tmpBase + ".time" )
99 config = context .config
1010 cmd = shellcommand .parse (commandline )
1111
@@ -16,24 +16,28 @@ def _mutateCommandLine(context, commandline):
1616 timeit_name = "timeit"
1717 else :
1818 timeit_name = "timeit-target"
19- timeit = "%s/tools/%s" % (config .test_source_root , timeit_name )
20- args = ["--limit-core" , "0" ]
21- args += ["--limit-cpu" , "7200" ]
22- args += ["--timeout" , "7200" ]
23- args += ["--limit-file-size" , "209715200" ]
24- args += ["--limit-rss-size" , "838860800" ]
25- workdir = cmd .workdir
19+
20+ timeit = os .path .normpath ("%s/tools/%s" % (config .test_source_root , timeit_name ))
21+ args = ["--timeout" , "7200" ]
22+ if os .name != 'nt' :
23+ args += ["--limit-core" , "0" ]
24+ args += ["--limit-cpu" , "7200" ]
25+ args += ["--limit-file-size" , "209715200" ]
26+ args += ["--limit-rss-size" , "838860800" ]
27+
28+ workdir = os .path .normpath (cmd .workdir ) if cmd .workdir is not None else None
29+
2630 if not config .traditional_output :
2731 stdout = cmd .stdout
2832 if cmd .stdout is not None :
2933 if not os .path .isabs (stdout ) and workdir is not None :
30- stdout = os .path .join (workdir , stdout )
34+ stdout = os .path .join (workdir , os . path . normpath ( stdout ) )
3135 args += ["--redirect-stdout" , stdout ]
3236 cmd .stdout = None
3337 stderr = cmd .stderr
3438 if stderr is not None :
3539 if not os .path .isabs (stderr ) and workdir is not None :
36- stderr = os .path .join (workdir , stderr )
40+ stderr = os .path .join (workdir , os . path . normpath ( stderr ) )
3741 args += ["--redirect-stderr" , stderr ]
3842 cmd .stderr = None
3943 else :
@@ -42,17 +46,18 @@ def _mutateCommandLine(context, commandline):
4246 "Separate stdout/stderr redirection not "
4347 + "possible with traditional output"
4448 )
45- outfile = context .tmpBase + ".out"
49+ outfile = os . path . normpath ( context .tmpBase + ".out" )
4650 args += ["--append-exitstatus" ]
4751 args += ["--redirect-output" , outfile ]
4852 stdin = cmd .stdin
4953 if stdin is not None :
5054 if not os .path .isabs (stdin ) and workdir is not None :
51- stdin = os .path .join (workdir , stdin )
55+ stdin = os .path .join (workdir , os . path . normpath ( stdin ) )
5256 args += ["--redirect-input" , stdin ]
5357 cmd .stdin = None
5458 else :
55- args += ["--redirect-input" , "/dev/null" ]
59+ if os .name != 'nt' :
60+ args += ["--redirect-input" , "/dev/null" ]
5661 if workdir is not None :
5762 args += ["--chdir" , workdir ]
5863 cmd .workdir = None
0 commit comments