Bug 1089771 - Change conditional statements to fix --chunk-by-dir on Android. r=jmaher
authorVaibhav Agrawal <vaibhavmagarwal@gmail.com>
Thu, 06 Nov 2014 05:35:00 -0500
changeset 214466 6740f4e7636a3a9e76c421659a2b90ddb9b29353
parent 214465 31a2e1b8b32be7651745b3980ef1d82b3c7f0a59
child 214467 5a26fa6c3ad270c6e78042135f568d07b15821d7
push id51494
push userkwierso@gmail.com
push dateFri, 07 Nov 2014 03:08:20 +0000
treeherdermozilla-inbound@c4b831696f15 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1089771
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 1089771 - Change conditional statements to fix --chunk-by-dir on Android. r=jmaher CLOSED TREE
testing/mochitest/chunkifyTests.js
--- a/testing/mochitest/chunkifyTests.js
+++ b/testing/mochitest/chunkifyTests.js
@@ -12,19 +12,25 @@ function chunkifyTests(tests, totalChunk
   // they're in
   if (chunkByDir) {
     chunkByDir = parseInt(chunkByDir);
     var tests_by_dir = {};
     var test_dirs = []
     for (var i = 0; i < tests.length; ++i) {
       if ((tests[i] instanceof Object) && ('test' in tests[i])) {
         var test_path = tests[i]['test']['url'];
-      } else {
+      }
+      else if ((tests[i] instanceof Object) && ('url' in tests[i])) {
+        // This condition is needed to run --chunk-by-dir on mochitest bc and dt.
         var test_path = tests[i]['url'];
       }
+      else {
+        // This condition is needed to run --chunk-by-dir on android chunks.
+        var test_path = tests[i];
+      }
       if (test_path[0] == '/') {
         test_path = test_path.substr(1);
       }
       // mochitest-chrome and mochitest-browser-chrome pass an array of chrome://
       // URIs
       var protocolRegexp = /^[a-zA-Z]+:\/\//;
       if (protocolRegexp.test(test_path)) {
         test_path = test_path.replace(protocolRegexp, "");