Bug 883314 part 3: adjust refactored chunking code to deal with mochitest-browser-chrome and mochitest-chrome file paths, r=jmaher

--HG--
extra : transplant_source : %ED%E7%ED%EEs%C5.%A0%FE%3ECEI60%A4h%C2%11Y
This commit is contained in:
Gavin Sharp 2013-06-16 11:22:48 -04:00
Родитель 30fa51a97b
Коммит 102d8be2b6
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -19,6 +19,12 @@ function chunkifyTests(tests, totalChunks, thisChunk, chunkByDir, logger) {
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, "");
}
var dir = test_path.split("/");
// We want the first chunkByDir+1 components, or everything but the
// last component, whichever is less.