Bug 1269501: Part 1 - Add $PYTHON variable to environment for subprocess xpcshell tests. r=glandium
I'm not especially happy with this method, but the DMD tests are the only
other tests I can find doing anything like this, and I don't have a better
solution than doing it the same way.
MozReview-Commit-ID: JlclyKoUhRf
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -645,16 +645,19 @@ class XPCShellTestThread(Thread):
preloadEnvVar = 'MOZ_REPLACE_MALLOC_LIB'
libdmd = os.path.join(self.xrePath, 'dmd.dll')
self.env['PYTHON'] = sys.executable
self.env['BREAKPAD_SYMBOLS_PATH'] = self.symbolsPath
self.env['DMD_PRELOAD_VAR'] = preloadEnvVar
self.env['DMD_PRELOAD_VALUE'] = libdmd
+ if self.test_object.get('subprocess') == 'true':
+ self.env['PYTHON'] = sys.executable
+
testTimeoutInterval = self.harness_timeout
# Allow a test to request a multiple of the timeout if it is expected to take long
if 'requesttimeoutfactor' in self.test_object:
testTimeoutInterval *= int(self.test_object['requesttimeoutfactor'])
testTimer = None
if not self.interactive and not self.debuggerInfo and not self.jsDebuggerInfo:
testTimer = Timer(testTimeoutInterval, lambda: self.testTimeout(proc))