Bug 1072024 - Fix TestGMPCrossOrigin when run with |mach gtest| - r=ted
authorEdwin Flores <eflores@mozilla.com>
Tue, 14 Oct 2014 11:04:59 +1300
changeset 210242 7600cd87ae2091c4d599520bba48fa5e2dd6d5ae
parent 210241 bdba7bcc32dcd68b647bfe997cdd0c917d347b00
child 210243 85634997827efd7a5b330b27f1b48f7f2d806be5
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersted
bugs1072024
milestone35.0a1
Bug 1072024 - Fix TestGMPCrossOrigin when run with |mach gtest| - r=ted
python/mozbuild/mozbuild/mach_commands.py
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -659,16 +659,20 @@ class GTestCommands(MachCommandBase):
         if not os.path.isdir(cwd):
             os.makedirs(cwd)
 
         # Use GTest environment variable to control test execution
         # For details see:
         # https://code.google.com/p/googletest/wiki/AdvancedGuide#Running_Test_Programs:_Advanced_Options
         gtest_env = {b'GTEST_FILTER': gtest_filter}
 
+        xre_path = os.path.join(self.topobjdir, "dist", "bin")
+        gtest_env["MOZ_XRE_DIR"] = xre_path
+        gtest_env["MOZ_GMP_PATH"] = os.path.join(xre_path, "gmp-fake", "1.0")
+
         gtest_env[b"MOZ_RUN_GTEST"] = b"True"
 
         if shuffle:
             gtest_env[b"GTEST_SHUFFLE"] = b"True"
 
         if tbpl_parser:
             gtest_env[b"MOZ_TBPL_PARSER"] = b"True"