Bug 1258607 - Output task names when entering and leaving in SimpleTest. r=jmaher
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Tue, 22 Mar 2016 16:48:59 -0400
changeset 290420 fbab845377a5bf1fe2215bccff9c5d2714f03e86
parent 290419 095be1660e1f5ba50f68feef4e0a74bcf0d4b6fa
child 290421 e769ae36cbc7175207bb865222afe4db82b316e6
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1258607
milestone48.0a1
Bug 1258607 - Output task names when entering and leaving in SimpleTest. r=jmaher This uses the same text as the equivalent code in browser-test.js. MozReview-Commit-ID: 2CzZEjf8ojn
testing/mochitest/tests/SimpleTest/SpawnTask.js
--- a/testing/mochitest/tests/SimpleTest/SpawnTask.js
+++ b/testing/mochitest/tests/SimpleTest/SpawnTask.js
@@ -267,17 +267,20 @@ var add_task = (function () {
       // Use setTimeout to ensure the master task runs after the client
       // script finishes.
       setTimeout(function () {
         spawn_task(function* () {
           // We stop the entire test file at the first exception because this
           // may mean that the state of subsequent tests may be corrupt.
           try {
             for (var task of task_list) {
+              var name = task.name || "";
+              info("SpawnTask.js | Entering test " + name);
               yield task();
+              info("SpawnTask.js | Leaving test " + name);
             }
           } catch (ex) {
             try {
               ok(false, "" + ex);
             } catch (ex2) {
               ok(false, "(The exception cannot be converted to string.)");
             }
           }