@@ -245,16 +245,20 @@ def run(self):
245245 Runs the specified scenario
246246 '''
247247 self .parseargs ()
248+
249+ python_command = pythoncommand ().split (' ' )
250+ python_exe = python_command [0 ]
251+ python_args = " " .join (python_command [1 :])
248252 if self .testtype == const .INNERLOOP :
249253 startup = StartupWrapper ()
250254 self .traits .add_traits (scenarioname = self .scenarioname ,
251255 scenariotypename = const .SCENARIO_NAMES [const .INNERLOOP ],
252256 apptorun = 'dotnet' , appargs = 'run --project %s' % appfolder (self .traits .exename , self .traits .projext ),
253- innerloopcommand = pythoncommand () ,
254- iterationsetup = pythoncommand () ,
255- setupargs = '%s %s setup_build' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
256- iterationcleanup = pythoncommand () ,
257- cleanupargs = '%s %s cleanup' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
257+ innerloopcommand = python_exe ,
258+ iterationsetup = python_exe ,
259+ setupargs = '%s %s setup_build' % (python_args , const .ITERATION_SETUP_FILE ),
260+ iterationcleanup = python_exe ,
261+ cleanupargs = '%s %s cleanup' % (python_args , const .ITERATION_SETUP_FILE ),
258262 affinity = self .affinity )
259263 startup .runtests (self .traits )
260264
@@ -263,11 +267,11 @@ def run(self):
263267 self .traits .add_traits (scenarioname = self .scenarioname ,
264268 scenariotypename = const .SCENARIO_NAMES [const .INNERLOOPMSBUILD ],
265269 apptorun = 'dotnet' , appargs = 'run --project %s' % appfolder (self .traits .exename , self .traits .projext ),
266- innerloopcommand = pythoncommand () ,
267- iterationsetup = pythoncommand () ,
268- setupargs = '%s %s setup_build' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
269- iterationcleanup = pythoncommand () ,
270- cleanupargs = '%s %s cleanup' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
270+ innerloopcommand = python_exe ,
271+ iterationsetup = python_exe ,
272+ setupargs = '%s %s setup_build' % (python_args , const .ITERATION_SETUP_FILE ),
273+ iterationcleanup = python_exe ,
274+ cleanupargs = '%s %s cleanup' % (python_args , const .ITERATION_SETUP_FILE ),
271275 affinity = self .affinity )
272276 startup .runtests (self .traits )
273277
@@ -276,11 +280,11 @@ def run(self):
276280 self .traits .add_traits (scenarioname = self .scenarioname ,
277281 scenariotypename = const .SCENARIO_NAMES [const .DOTNETWATCH ],
278282 apptorun = 'dotnet' , appargs = 'watch -v' ,
279- innerloopcommand = pythoncommand () ,
280- iterationsetup = pythoncommand () ,
281- setupargs = '%s %s setup_build' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
282- iterationcleanup = pythoncommand () ,
283- cleanupargs = '%s %s cleanup' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
283+ innerloopcommand = python_exe ,
284+ iterationsetup = python_exe ,
285+ setupargs = '%s %s setup_build' % (python_args , const .ITERATION_SETUP_FILE ),
286+ iterationcleanup = python_exe ,
287+ cleanupargs = '%s %s cleanup' % (python_args , const .ITERATION_SETUP_FILE ),
284288 affinity = self .affinity )
285289 self .traits .add_traits (workingdir = const .APPDIR )
286290 startup .runtests (self .traits )
@@ -312,10 +316,10 @@ def run(self):
312316 scenariotypename = '%s_%s' % (const .SCENARIO_NAMES [const .SDK ], const .CLEAN_BUILD ),
313317 apptorun = const .DOTNET ,
314318 appargs = 'build' ,
315- iterationsetup = pythoncommand () ,
316- setupargs = '%s %s setup_build' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
317- iterationcleanup = pythoncommand () ,
318- cleanupargs = '%s %s cleanup' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
319+ iterationsetup = python_exe ,
320+ setupargs = '%s %s setup_build' % (python_args , const .ITERATION_SETUP_FILE ),
321+ iterationcleanup = python_exe ,
322+ cleanupargs = '%s %s cleanup' % (python_args , const .ITERATION_SETUP_FILE ),
319323 workingdir = const .APPDIR ,
320324 environmentvariables = envlistcleanbuild ,
321325 )
@@ -344,10 +348,10 @@ def run(self):
344348 apptorun = const .DOTNET ,
345349 scenarioname = self .scenarioname ,
346350 scenariotypename = '%s_%s' % (const .SCENARIO_NAMES [const .SDK ], const .NEW_CONSOLE ),
347- iterationsetup = pythoncommand () ,
348- setupargs = '%s %s setup_new' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
349- iterationcleanup = pythoncommand () ,
350- cleanupargs = '%s %s cleanup' % ('-3' if iswin () else '' , const .ITERATION_SETUP_FILE ),
351+ iterationsetup = python_exe ,
352+ setupargs = '%s %s setup_new' % (python_args , const .ITERATION_SETUP_FILE ),
353+ iterationcleanup = python_exe ,
354+ cleanupargs = '%s %s cleanup' % (python_args , const .ITERATION_SETUP_FILE ),
351355 workingdir = const .APPDIR
352356 )
353357 self .traits .add_traits (overwrite = True , startupmetric = const .STARTUP_PROCESSTIME )
0 commit comments