Bug 1269501: Part 1 - Add $PYTHON variable to environment for subprocess xpcshell tests. r=glandium draft
authorKris Maglione <maglione.k@gmail.com>
Sun, 08 May 2016 20:33:36 -0700
changeset 371149 2906a6aa3a65fd388db6c388c3fe8d582e02d76f
parent 362998 89e43e5ca199c1f9caf2c079a118b2388aeb10b2
child 371150 bcbf14796fcaa31097273df81d64173e824bb45e
push id19255
push usermaglione.k@gmail.com
push dateThu, 26 May 2016 01:37:06 +0000
reviewersglandium
bugs1269501
milestone49.0a1
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
testing/xpcshell/runxpcshelltests.py
--- 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))