Bug 1303804 - Fix Promise test that relies on non-release feature (async stacks), r=froydnj
authorSteve Fink <sfink@mozilla.com>
Mon, 19 Sep 2016 15:21:25 -0700
changeset 314464 78ceb8466691d60ec7543f30df74fa5dff939ff9
parent 314463 edf9ffaf92b0490c04b689a19c7bc6a1edb2ec42
child 314465 ad7f61e0eed2a43712cb860a94f386edd72c18ac
push id20574
push usercbook@mozilla.com
push dateTue, 20 Sep 2016 10:05:16 +0000
treeherderfx-team@14705f779a46 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1303804
milestone52.0a1
Bug 1303804 - Fix Promise test that relies on non-release feature (async stacks), r=froydnj MozReview-Commit-ID: A9qEg11NOt
testing/xpcshell/selftest.py
--- a/testing/xpcshell/selftest.py
+++ b/testing/xpcshell/selftest.py
@@ -9,30 +9,30 @@ import mozunit
 import os
 import pprint
 import re
 import shutil
 import sys
 import tempfile
 import unittest
 
+from buildconfig import substs
 from StringIO import StringIO
 from mozlog import structured
 from mozbuild.base import MozbuildObject
 os.environ.pop('MOZ_OBJDIR', None)
 build_obj = MozbuildObject.from_environment()
 
 from runxpcshelltests import XPCShellTests
 
 mozinfo.find_and_update_from_json()
 
 objdir = build_obj.topobjdir.encode("utf-8")
 
 if mozinfo.isMac:
-  from buildconfig import substs
   xpcshellBin = os.path.join(objdir, "dist", substs['MOZ_MACBUNDLE_NAME'], "Contents", "MacOS", "xpcshell")
 else:
   xpcshellBin = os.path.join(objdir, "dist", "bin", "xpcshell")
   if sys.platform == "win32":
     xpcshellBin += ".exe"
 
 TEST_PASS_STRING = "TEST-PASS"
 TEST_FAIL_STRING = "TEST-UNEXPECTED-FAIL"
@@ -853,17 +853,19 @@ add_test({
         """
         Ensure a simple test with an uncaught rejection is reported.
         """
         self.writeFile("test_simple_uncaught_rejection.js", SIMPLE_UNCAUGHT_REJECTION_TEST)
         self.writeManifest(["test_simple_uncaught_rejection.js"])
 
         self.assertTestResult(False)
         self.assertInLog(TEST_FAIL_STRING)
-        self.assertInLog("test_simple_uncaught_rejection.js:3:3")
+        if not substs.get('RELEASE_BUILD'):
+          # async stacks are currently not enabled in release builds.
+          self.assertInLog("test_simple_uncaught_rejection.js:3:3")
         self.assertInLog("Test rejection.")
         self.assertEquals(1, self.x.testCount)
         self.assertEquals(0, self.x.passCount)
         self.assertEquals(1, self.x.failCount)
 
     def testUncaughtRejectionJSM(self):
         """
         Ensure a simple test with an uncaught rejection from Promise.jsm is reported.