gen_wpt_cts_html (1452B)
1 #!/usr/bin/env node 2 3 // Generate a top-level cts.https.html file for WPT. 4 // 5 // In the default invocation (used by grunt), just generates a cts.https.html with one "variant" 6 // per test spec file (.spec.ts). 7 // 8 // In the advanced invocation, generate a list of variants, which are broken down as much as needed 9 // to accommodate a provided list of suppressions, and no further. This reduces the total runtime of 10 // the test suite by not generating an entire page load for every single test case. 11 // The resulting cts.https.html can be checked in and used to run tests within browser harnesses. 12 // 13 // For example, for the following 9 cases: 14 // 15 // webgpu:a/foo:foo1={"x":1} 16 // webgpu:a/foo:foo1={"x":2} 17 // webgpu:a/foo:foo2={"x":1} 18 // webgpu:a/foo:foo2={"x":2} 19 // webgpu:a/bar:bar1={"x":1} 20 // webgpu:a/bar:bar1={"x":2} 21 // webgpu:a/bar:bar1={"x":3} 22 // webgpu:a/bar:bar2={"x":1} 23 // webgpu:a/bar:bar2={"x":2} 24 // 25 // and the following suppressions: 26 // 27 // [ Win ] ?q=webgpu:a/bar:bar1={"x":1} [ Failure ] 28 // [ Mac ] ?q=webgpu:a/bar:bar1={"x":3} [ Failure ] 29 // 30 // the following list of 5 variants gives enough granularity to suppress only the failing cases: 31 // 32 // ?q=webgpu:a/foo: 33 // ?q=webgpu:a/bar:bar1={"x":1} <- [ Win ] 34 // ?q=webgpu:a/bar:bar1={"x":2} 35 // ?q=webgpu:a/bar:bar1={"x":3} <- [ Mac ] 36 // ?q=webgpu:a/bar:bar2~ 37 38 require('../src/common/tools/setup-ts-in-node.js'); 39 require('../src/common/tools/gen_wpt_cts_html.ts');