Bug 1100695 - Wait for child to finish in test_child_assert XPCShell unit test. r=chmanchester
authorAndrew McCreight <continuation@gmail.com>
Mon, 24 Nov 2014 11:34:03 -0800
changeset 217170 f86a92a28ec9bc027a5b955a0cc7ec18ab84c0fc
parent 217169 a0f54a85aec450b0ce7918eda91d312774242331
child 217171 49ec38b3777bdea5479f9a9ce5b46c90f0c7dc75
push id52240
push useramccreight@mozilla.com
push dateMon, 24 Nov 2014 19:34:14 +0000
treeherdermozilla-inbound@f86a92a28ec9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1100695
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1100695 - Wait for child to finish in test_child_assert XPCShell unit test. r=chmanchester
testing/xpcshell/selftest.py
--- a/testing/xpcshell/selftest.py
+++ b/testing/xpcshell/selftest.py
@@ -71,17 +71,18 @@ add_test(function test_child_simple () {
 });
 '''
 
 CHILD_HARNESS_SIMPLE = '''
 function run_test () { run_next_test(); }
 
 add_test(function test_child_assert () {
   do_load_child_test_harness();
-  sendCommand("Assert.ok(true);");
+  do_test_pending("test child assertion");
+  sendCommand("Assert.ok(true);", do_test_finished);
   run_next_test();
 });
 '''
 
 CHILD_TEST_HANG = '''
 function run_test () { run_next_test(); }
 
 add_test(function test_child_simple () {
@@ -465,17 +466,18 @@ tail =
         self.assertNotInLog("CHILD-TEST-COMPLETED")
         self.assertNotInLog(TEST_PASS_STRING)
 
     @unittest.skipIf(build_obj.defines.get('MOZ_B2G'),
                      'selftests with child processes fail on b2g desktop builds')
     def testChild(self):
         """
         Checks that calling do_load_child_test_harness without run_test_in_child
-        results in a usable test state.
+        results in a usable test state. This test has a spurious failure when
+        run using |mach python-test|. See bug 1103226.
         """
         self.writeFile("test_child_assertions.js", CHILD_HARNESS_SIMPLE)
         self.writeManifest(["test_child_assertions.js"])
 
         self.assertTestResult(True)
         self.assertEquals(1, self.x.testCount)
         self.assertEquals(1, self.x.passCount)
         self.assertEquals(0, self.x.failCount)