Bug 1032787 - [tps] FirefoxRunner should not reset environment variables. r=aeftimie a=testonly DONTBUILD
authorHenrik Skupin <mail@hskupin.info>
Tue, 01 Jul 2014 17:30:58 +0200
changeset 200726 959746d4b268b939c58ff480b3180a90ef305243
parent 200725 a40ba268ccf6ab1ff82a090afffc78df91234d83
child 200727 9d89ab77e097e784ea6502cabc609cec97a41f39
push id486
push userasasaki@mozilla.com
push dateMon, 14 Jul 2014 18:39:42 +0000
treeherdermozilla-release@d33428174ff1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaeftimie, testonly
bugs1032787
milestone31.0
Bug 1032787 - [tps] FirefoxRunner should not reset environment variables. r=aeftimie a=testonly DONTBUILD
testing/tps/tps/testrunner.py
--- a/testing/tps/tps/testrunner.py
+++ b/testing/tps/tps/testrunner.py
@@ -41,17 +41,17 @@ class TempFile(object):
         if os.access(self.filename, os.F_OK):
             os.remove(self.filename)
 
     __del__ = cleanup
 
 
 class TPSTestRunner(object):
 
-    default_env = {
+    extra_env = {
         'MOZ_CRASHREPORTER_DISABLE': '1',
         'GNOME_DISABLE_CRASH_DIALOG': '1',
         'XRE_NO_WINDOWS_CRASH_DIALOG': '1',
         'MOZ_NO_REMOTE': '1',
         'XPCOM_DEBUG_BREAK': 'warn',
     }
 
     default_preferences = {
@@ -346,19 +346,21 @@ class TPSTestRunner(object):
         if self.debug:
             self.preferences.update(self.debug_preferences)
 
     def run_tests(self):
         # delete the logfile if it already exists
         if os.access(self.logfile, os.F_OK):
             os.remove(self.logfile)
 
-        # Make a copy of the default env variables and preferences, and update
-        # them for custom settings
-        self.env = self.default_env.copy()
+        # Copy the system env variables, and update them for custom settings
+        self.env = os.environ.copy()
+        self.env.update(self.extra_env)
+
+        # Update preferences for custom settings
         self.update_preferences()
 
         # Acquire a lock to make sure no other threads are running tests
         # at the same time.
         if self.rlock:
             self.rlock.acquire()
 
         try: