gecko-dev/testing/web-platform/tests/common/subset-tests.js

54 строки
1.8 KiB
JavaScript
Исходник Обычный вид История

// Only test a subset of tests with, e.g., ?1-10 in the URL.
// Can be used together with <meta name="variant" content="...">
// Sample usage:
// for (const test of tests) {
// subsetTest(async_test, test.fn, test.name);
// }
(function() {
var subTestStart = 0;
var subTestEnd = Infinity;
var match;
if (location.search) {
match = /(?:^\?|&)(\d+)-(\d+|last)(?:&|$)/.exec(location.search);
if (match) {
subTestStart = parseInt(match[1], 10);
if (match[2] !== "last") {
subTestEnd = parseInt(match[2], 10);
Backed out 92 changesets (bug 1467661, bug 1466064, bug 1466075, bug 1437740, bug 1459354, bug 1467079, bug 1466970, bug 1461365, bug 1466507, bug 1467310, bug 1466522, bug 1466158, bug 1466173, bug 1466116, bug 1466812, bug 1466108, bug 1466119, bug 1465045, bug 1466057, bug 1460771, bug 1467512, bug 1466557, bug 1466366, bug 1466206, bug 1464861, bug 1464182, bug 1466289, bug 1467579, bug 1466731, bug 1465917, bug 1466752, bug 1466273, bug 1466506, bug 1467571, bug 1467711, bug 1466710, bug 1467554, bug 1465746, bug 1467618, bug 1468799, bug 1466823, bug 1466796, bug 1466602, bug 1465661, bug 1450172, bug 1466798, bug 1438330, bug 1466770, bug 1467060, bug 1466968, bug 1465780, bug 1466079, bug 1466300, bug 1452945, bug 1467708, bug 1467516, bug 1466195, bug 1466260, bug 1464976, bug 1465437, bug 1466741, bug 1464957, bug 1466460, bug 1466463, bug 1466442, bug 1467168, bug 1466566, bug 1467351, bug 1464931) for wpt mass failures on a CLOSED TREE Backed out changeset 5d5fed1922dd (bug 1467554) Backed out changeset 1806b9822582 (bug 1466507) Backed out changeset 2336cc4ca2d2 (bug 1466507) Backed out changeset a3bd6fdccdc8 (bug 1438330) Backed out changeset 2f6df5e484b2 (bug 1438330) Backed out changeset 6880a2a5cfe0 (bug 1467512) Backed out changeset 2802de5b96e6 (bug 1467711) Backed out changeset 16f14f7b237e (bug 1467708) Backed out changeset 9db2d675cd94 (bug 1467708) Backed out changeset cadbab26c4c0 (bug 1467579) Backed out changeset 324874fd667e (bug 1467661) Backed out changeset 42bbb9d89d1e (bug 1467618) Backed out changeset cb6955c6bc5d (bug 1464976) Backed out changeset 2f41b56a6b12 (bug 1464976) Backed out changeset 835950053cc7 (bug 1467571) Backed out changeset a1072c199fd4 (bug 1467516) Backed out changeset a1ec2c9c44fc (bug 1467060) Backed out changeset 90138b0a5a8c (bug 1467079) Backed out changeset ebeb8816f771 (bug 1468799) Backed out changeset 9db7a55ae594 (bug 1467351) Backed out changeset 42907423c6cd (bug 1467351) Backed out changeset b7d6284c6d32 (bug 1467310) Backed out changeset b8f10e83eab2 (bug 1467310) Backed out changeset bd318d9b9a2b (bug 1466116) Backed out changeset f4c5360b3ab4 (bug 1466798) Backed out changeset c16f9f13a1af (bug 1467168) Backed out changeset 666d92f992fb (bug 1466075) Backed out changeset febbc42c7d8f (bug 1466075) Backed out changeset 97f58661d408 (bug 1466970) Backed out changeset 28bcacafede4 (bug 1466970) Backed out changeset 7e0584c3ccea (bug 1466968) Backed out changeset 68f23429cb70 (bug 1466731) Backed out changeset 2faa240b4fe5 (bug 1466079) Backed out changeset ea9f58856bd0 (bug 1466522) Backed out changeset a9e12a05dcfa (bug 1466300) Backed out changeset 3ac4a4226f2f (bug 1466300) Backed out changeset d2b20e8139f3 (bug 1466506) Backed out changeset 654939f9e9cd (bug 1437740) Backed out changeset d64d94aa6f35 (bug 1464861) Backed out changeset ebc64065cf0c (bug 1461365) Backed out changeset e52adc51ab6f (bug 1466796) Backed out changeset 704e07e5800a (bug 1466823) Backed out changeset 68f3ab3a285e (bug 1450172) Backed out changeset 4f49d0d72ea5 (bug 1466812) Backed out changeset f9c722a7d875 (bug 1452945) Backed out changeset 4ff137e10c3f (bug 1466602) Backed out changeset 2e94891d59b8 (bug 1466602) Backed out changeset 11108df0fae4 (bug 1466770) Backed out changeset efd28be672f5 (bug 1466770) Backed out changeset e957fe1981f2 (bug 1465437) Backed out changeset 8119ee3bcb26 (bug 1465437) Backed out changeset 8c83448ff830 (bug 1466366) Backed out changeset fae61b46d4b5 (bug 1466366) Backed out changeset 74a21375a7d9 (bug 1466752) Backed out changeset 148cd8a91dee (bug 1466710) Backed out changeset 8a788ec47a1e (bug 1466741) Backed out changeset 6d6bfe66dde6 (bug 1466289) Backed out changeset 402bbf78b4cc (bug 1460771) Backed out changeset a401456c4b11 (bug 1465045) Backed out changeset 0db160d046d1 (bug 1465045) Backed out changeset 9c49cfec2e80 (bug 1459354) Backed out changeset 168b53cc7982 (bug 1459354) Backed out changeset 07c67995b90c (bug 1466442) Backed out changeset 17296e74b59b (bug 1466566) Backed out changeset 0c3f14124989 (bug 1466557) Backed out changeset 21f3acd343a6 (bug 1466463) Backed out changeset 59a115ed102f (bug 1466273) Backed out changeset cacbb6915d45 (bug 1466108) Backed out changeset 3399b738459f (bug 1464931) Backed out changeset e0b51c8761de (bug 1464931) Backed out changeset 8cf3834a3f25 (bug 1465780) Backed out changeset d1299e9f1453 (bug 1465780) Backed out changeset ec64816767c4 (bug 1466064) Backed out changeset d878df1adb73 (bug 1466460) Backed out changeset 0d5cf1167448 (bug 1466206) Backed out changeset 6991c57a7529 (bug 1464182) Backed out changeset 48c118bfefb4 (bug 1464182) Backed out changeset dcebab7e152c (bug 1466260) Backed out changeset a17b8dec2abf (bug 1466173) Backed out changeset 56548c714c64 (bug 1466173) Backed out changeset 652f080b84cd (bug 1466158) Backed out changeset d164f36fd775 (bug 1466057) Backed out changeset 3c3508173782 (bug 1466057) Backed out changeset bbd01af27702 (bug 1465917) Backed out changeset 57a276ab02e0 (bug 1464957) Backed out changeset 4a09efedca60 (bug 1465661) Backed out changeset 3ae673157cb4 (bug 1465661) Backed out changeset cfdc0066db98 (bug 1466195) Backed out changeset 16fd85bc9879 (bug 1466119) Backed out changeset 4dd3fe55ab44 (bug 1466119) Backed out changeset a178a380ac06 (bug 1465746) Backed out changeset 4adf72720fbb (bug 1465746) --HG-- rename : testing/web-platform/tests/tools/third_party/html5lib/.gitmodules => testing/web-platform/tests/tools/html5lib/.gitmodules rename : testing/web-platform/tests/tools/third_party/html5lib/CONTRIBUTING.rst => testing/web-platform/tests/tools/html5lib/CONTRIBUTING.rst rename : testing/web-platform/tests/tools/third_party/html5lib/LICENSE => testing/web-platform/tests/tools/html5lib/LICENSE rename : testing/web-platform/tests/tools/third_party/html5lib/doc/Makefile => testing/web-platform/tests/tools/html5lib/doc/Makefile rename : testing/web-platform/tests/tools/third_party/html5lib/doc/changes.rst => testing/web-platform/tests/tools/html5lib/doc/changes.rst rename : testing/web-platform/tests/tools/third_party/html5lib/doc/license.rst => testing/web-platform/tests/tools/html5lib/doc/license.rst rename : testing/web-platform/tests/tools/third_party/html5lib/doc/make.bat => testing/web-platform/tests/tools/html5lib/doc/make.bat rename : testing/web-platform/tests/tools/third_party/html5lib/doc/modules.rst => testing/web-platform/tests/tools/html5lib/doc/modules.rst rename : testing/web-platform/tests/tools/third_party/html5lib/html5lib/filters/base.py => testing/web-platform/tests/tools/html5lib/html5lib/filters/_base.py rename : testing/web-platform/tests/tools/third_party/html5lib/html5lib/tests/__init__.py => testing/web-platform/tests/tools/html5lib/html5lib/tests/__init__.py rename : testing/web-platform/tests/tools/third_party/html5lib/html5lib/tests/tokenizertotree.py => testing/web-platform/tests/tools/html5lib/html5lib/tests/tokenizertotree.py rename : testing/web-platform/tests/tools/third_party/html5lib/html5lib/tests/us-ascii.html => testing/web-platform/tests/tools/html5lib/html5lib/tests/us-ascii.html rename : testing/web-platform/tests/tools/third_party/html5lib/html5lib/tests/utf-8-bom.html => testing/web-platform/tests/tools/html5lib/html5lib/tests/utf-8-bom.html rename : testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/datrie.py => testing/web-platform/tests/tools/html5lib/html5lib/trie/datrie.py rename : testing/web-platform/tests/tools/third_party/html5lib/html5lib/_trie/py.py => testing/web-platform/tests/tools/html5lib/html5lib/trie/py.py rename : testing/web-platform/tests/tools/third_party/six/six.egg-info/top_level.txt => testing/web-platform/tests/tools/html5lib/requirements.txt rename : testing/web-platform/tests/tools/third_party/six/MANIFEST.in => testing/web-platform/tests/tools/six/MANIFEST.in rename : testing/web-platform/tests/tools/third_party/six/documentation/Makefile => testing/web-platform/tests/tools/six/documentation/Makefile
2018-06-28 06:31:48 +03:00
}
}
// Below is utility code to generate <meta> for copy/paste into tests.
// Sample usage:
// test.html?split=1000
match = /(?:^\?|&)split=(\d+)(?:&|$)/.exec(location.search);
if (match) {
var testsPerVariant = parseInt(match[1], 10);
add_completion_callback(tests => {
var total = tests.length;
var template = '<meta name="variant" content="?%s-%s">';
var metas = [];
for (var i = 1; i < total - testsPerVariant; i = i + testsPerVariant) {
metas.push(template.replace("%s", i).replace("%s", i + testsPerVariant - 1));
}
metas.push(template.replace("%s", i).replace("%s", "last"));
var pre = document.createElement('pre');
pre.textContent = metas.join('\n');
document.body.insertBefore(pre, document.body.firstChild);
document.getSelection().selectAllChildren(pre);
});
}
}
function shouldRunSubTest(currentSubTest) {
return currentSubTest >= subTestStart && currentSubTest <= subTestEnd;
}
var currentSubTest = 0;
function subsetTest(testFunc, ...args) {
currentSubTest++;
if (shouldRunSubTest(currentSubTest)) {
return testFunc(...args);
}
return null;
}
self.shouldRunSubTest = shouldRunSubTest;
self.subsetTest = subsetTest;
})();