mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Generate and load CTS cache
Cache .json files are generated at build time. This relies on a list of the expected cache outputs. The path to the cache is hardcoded in the test_runner and the .json files are loaded at runtime. Change-Id: Icc125125df7e9c338a243526dbc4950a2517039f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110441 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
import { globalTestConfig } from '../third_party/webgpu-cts/src/common/framework/test_config.js';
|
||||
import { dataCache } from '../third_party/webgpu-cts/src/common/framework/data_cache.js';
|
||||
import { DefaultTestFileLoader } from '../third_party/webgpu-cts/src/common/internal/file_loader.js';
|
||||
import { prettyPrintLog } from '../third_party/webgpu-cts/src/common/internal/logging/log_message.js';
|
||||
import { Logger } from '../third_party/webgpu-cts/src/common/internal/logging/logger.js';
|
||||
@@ -98,6 +99,12 @@ async function runCtsTestViaSocket(event) {
|
||||
runCtsTest(input['q'], input['w']);
|
||||
}
|
||||
|
||||
dataCache.setStore({
|
||||
load: async (path) => {
|
||||
return await (await fetch(`/third_party/webgpu-cts/cache/data/${path}`)).text();
|
||||
}
|
||||
});
|
||||
|
||||
// Make a rate-limited version `sendMessageTestHeartbeat` that executes
|
||||
// at most once every 500 ms.
|
||||
const [sendHeartbeat, {
|
||||
|
||||
Reference in New Issue
Block a user