summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/tests/cts/checkout/src/common/tools/presubmit.ts
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webgpu/tests/cts/checkout/src/common/tools/presubmit.ts')
-rw-r--r--dom/webgpu/tests/cts/checkout/src/common/tools/presubmit.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/dom/webgpu/tests/cts/checkout/src/common/tools/presubmit.ts b/dom/webgpu/tests/cts/checkout/src/common/tools/presubmit.ts
new file mode 100644
index 0000000000..27505e759e
--- /dev/null
+++ b/dom/webgpu/tests/cts/checkout/src/common/tools/presubmit.ts
@@ -0,0 +1,19 @@
+import { DefaultTestFileLoader } from '../internal/file_loader.js';
+import { parseQuery } from '../internal/query/parseQuery.js';
+import { assert } from '../util/util.js';
+
+void (async () => {
+ for (const suite of ['unittests', 'webgpu']) {
+ const loader = new DefaultTestFileLoader();
+ const filterQuery = parseQuery(`${suite}:*`);
+ const testcases = await loader.loadCases(filterQuery);
+ for (const testcase of testcases) {
+ const name = testcase.query.toString();
+ const maxLength = 375;
+ assert(
+ name.length <= maxLength,
+ `Testcase ${name} is too long. Max length is ${maxLength} characters. Please shorten names or reduce parameters.`
+ );
+ }
+ }
+})();