mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 05:39:41 +02:00
Automatic update from web-platform-tests Roll external/wpt/webgpu and create wpt_internal/webgpu There are now two copies of the WebGPU CTS: - A build of the cts master branch, in external/wpt/webgpu/. - A build of the glsl-dependent branch, in wpt_internal/webgpu/. This branch depends on a cipd dependency on glslang.js, and is expected to be used with Chromium only. The branch will dissolve back into master when we can migrate the GLSL-dependent tests to WGSL. Bug: 1069302 Change-Id: Iceb75deea668aee56d77c0d0a5f188c79ef9844c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144926 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Cr-Commit-Position: refs/heads/master@{#759504} -- wpt-commits: b666e086c1f103ec69deecf48fcc166a5fb90861 wpt-pr: 22838
59 lines
No EOL
1.7 KiB
JavaScript
59 lines
No EOL
1.7 KiB
JavaScript
/**
|
|
* AUTO-GENERATED - DO NOT EDIT. Source: https://github.com/gpuweb/cts
|
|
**/
|
|
|
|
import { TestLoader } from '../framework/loader.js';
|
|
import { Logger } from '../framework/logger.js';
|
|
import { makeQueryString } from '../framework/url_query.js';
|
|
import { AsyncMutex } from '../framework/util/async_mutex.js';
|
|
import { optionEnabled } from './helper/options.js';
|
|
import { TestWorker } from './helper/test_worker.js';
|
|
|
|
(async () => {
|
|
const loader = new TestLoader();
|
|
const files = await loader.loadTestsFromQuery(window.location.search);
|
|
const worker = optionEnabled('worker') ? new TestWorker() : undefined;
|
|
const log = new Logger();
|
|
const mutex = new AsyncMutex();
|
|
const running = [];
|
|
|
|
for (const f of files) {
|
|
if (!('g' in f.spec)) {
|
|
continue;
|
|
}
|
|
|
|
const [rec] = log.record(f.id);
|
|
|
|
for (const t of f.spec.g.iterate(rec)) {
|
|
const name = makeQueryString(f.id, t.id); // Note: apparently, async_tests must ALL be added within the same task.
|
|
|
|
async_test(function () {
|
|
const p = mutex.with(async () => {
|
|
let r;
|
|
|
|
if (worker) {
|
|
r = await worker.run(name);
|
|
t.injectResult(r);
|
|
} else {
|
|
r = await t.run();
|
|
}
|
|
|
|
this.step(() => {
|
|
// Unfortunately, it seems not possible to surface any logs for warn/skip.
|
|
if (r.status === 'fail') {
|
|
throw (r.logs || []).map(s => s.toJSON()).join('\n\n');
|
|
}
|
|
});
|
|
this.done();
|
|
});
|
|
running.push(p);
|
|
return p;
|
|
}, name);
|
|
}
|
|
}
|
|
|
|
await Promise.all(running);
|
|
const resultsElem = document.getElementById('results');
|
|
resultsElem.textContent = log.asJSON(2);
|
|
})();
|
|
//# sourceMappingURL=wpt.js.map
|