WebGPU CTS: Generate JS sources during build
This patch adds third_party/webgpu-cts/BUILD.gn which has
Node.js GN actions to compile the Typescript sources in
third_party/webgpu-cts/src.
All of the generated JS files are placed in /gen which the WebGPU
CTS runner will be able to reference in the future. This
would remove the manual compile step, making it unnecessary
to check in compiled sources.
In addition to transpiling sources, preparing the CTS files
also depends on gen_listings.
|gen_listings| is more involved and is left out for now as it
waiting on upstream changes to roll.
In order to work well with GN, we need to know the list of
files for the Typescript transpilation.
This list is checked in and verified using a presubmit check.
Bug: 1186320
Change-Id: Ib79234e898fa856d70f71c12669766cb2a5a58bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2750868
Reviewed-by: Kai Ninomiya <[email protected]>
Reviewed-by: Jochen Eisinger <[email protected]>
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Austin Eng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#864272}
diff --git a/BUILD.gn b/BUILD.gn
index 434c215d..021c69afd 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1225,7 +1225,10 @@
"--isolated-script-test-filter=wpt_internal/webgpu/*",
]
- data_deps = [ ":blink_web_tests_support_data" ]
+ data_deps = [
+ ":blink_web_tests_support_data",
+ "//third_party/webgpu-cts",
+ ]
data = [
"//third_party/blink/web_tests/WebGPUExpectations",
"//third_party/blink/web_tests/external/wpt/webgpu/",