Bug 959698 - Make json test manifest typos fail in a more obvious manner; r=jmaher
authorEd Morley <emorley@mozilla.com>
Fri, 17 Jan 2014 17:11:22 +0000
changeset 163981 524b5b1776473bdcac482305fcea310d69b2c7de
parent 163980 7eb615c086e89f50885b4dbca4b3c7367a9d5ff5
child 163982 011815b28db278c9f4b9bf8f336aec8e9f36d73e
push id38606
push useremorley@mozilla.com
push dateFri, 17 Jan 2014 17:11:55 +0000
treeherdermozilla-inbound@524b5b177647 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs959698
milestone29.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 959698 - Make json test manifest typos fail in a more obvious manner; r=jmaher
testing/mochitest/manifestLibrary.js
--- a/testing/mochitest/manifestLibrary.js
+++ b/testing/mochitest/manifestLibrary.js
@@ -37,19 +37,24 @@ function parseTestManifest(testManifest,
 }
 
 function getTestManifest(url, params, callback) {
   var req = new XMLHttpRequest();
   req.open("GET", url);
   req.onload = function() {
     if (req.readyState == 4) {
       if (req.status == 200) {
-        parseTestManifest(JSON.parse(req.responseText), params, callback);
+        try {
+          parseTestManifest(JSON.parse(req.responseText), params, callback);
+        } catch (e) {
+          dump("TEST-UNEXPECTED-FAIL: setup.js | error parsing " + url + " (" + e + ")\n");
+          throw e;
+        }
       } else {
-        dump("TEST-ERROR: setup.js | error loading " + url + "\n");
+        dump("TEST-UNEXPECTED-FAIL: setup.js | error loading " + url + "\n");
         callback({});
       }
     }
   }
   req.send();
 }
 
 // Test Filtering Code
@@ -135,9 +140,8 @@ function filterTests(filter, testList, r
       }
     }
     if (!found) {
       refilteredTests.push(testpath);
     }
   }
   return refilteredTests;
 }
-