https://dawn.googlesource.com/dawn.git/+/refs/heads/main/webgpu-cts/README.md
- linux-dawn-rel
- dawn-linux-x64-deps-rel
file tryserver.chromium.dawn.star
- the CTS repo: https://github.com/gpuweb/cts
- dawn:
third_party/webgpu-cts
- chromum:
src/third_party/webgpu-cts
- the chromum build
src/out/Release/gen/third_party/dawn/third_party/webgpu-cts
(built, so .js, not .ts)
telemetry uses 2, mostly, I think wpt tests use 4 built from 3, dawn uses 2
edit infra/config/generated/testing/test_suites.pyl
and infra/config/targets/basic_suites.star
then run the following 3 commands
infra/config/main.star
infra/config/scripts/sync-pyl-files.py
./testing/buildbot/generate_buildbot_json.py
# copy from CTS to dawn
cp -r /Users/gman/src/gpuweb/cts/src/* $S/chromium/src/third_party/dawn/third_party/webgpu-cts/src/
# remove old generated cts
rm -rf /Users/gman/src/chromium/src/out/Release/gen/third_party/dawn/third_party/webgpu-cts
# build
nr telemetry_gpu_integration_test
# run (compat mode example)
./testing/scripts/run_gpu_integration_test_as_googletest.py content/test/gpu/run_gpu_integration_test.py --isolated-script-test-output=$T/output.json --isolated-script-test-perf-output=$T/perftest-output.json webgpu_cts --show-stdout --browser=release --passthrough -v "--extra-browser-args=--enable-logging=stderr --use-webgpu-adapter=opengles --force-webgpu-compat --use-angle=gles-egl --no-sandbox" "--test-filter=*render_pipeline,sample_mask*" --retry-limit=1 --jobs=1 --use-webgpu-compat-mode --skip-post-test-cleanup-and-debug-info
diff for src/chromium/src/third_party/catapult/third_party/typ/typ/runner.py
to skip first N tests
diff --git a/third_party/typ/typ/runner.py b/third_party/typ/typ/runner.py
index 7f82d863a..e62067237 100644
--- a/third_party/typ/typ/runner.py
+++ b/third_party/typ/typ/runner.py
@@ -1072,6 +1072,8 @@ def _teardown_process(child):
return (child.worker_num, res, exc)
+hacked_skip_count = 57000 #56540 #56510
+hacked_test_count = 0
def _run_one_test(child, test_input):
def _get_expected_results_and_retry_on_failure():
@@ -1083,6 +1085,10 @@ def _run_one_test(child, test_input):
expected_results, should_retry_on_failure = {ResultType.Pass}, False
return expected_results, should_retry_on_failure
+ global hacked_test_count
+ global hacked_skip_count
+ hacked_test_count = hacked_test_count + 1
+
h = child.host
pid = h.getpid()
test_name = test_input.name
@@ -1106,7 +1112,7 @@ def _run_one_test(child, test_input):
if child.all:
unittest.skip = lambda reason: lambda x: x
unittest.skipIf = lambda condition, reason: lambda x: x
- elif ResultType.Skip in expected_results:
+ elif ResultType.Skip in expected_results or hacked_test_count <= hacked_skip_count:
h.restore_output()
return (Result(test_name, ResultType.Skip, started, 0,
child.worker_num, expected=expected_results,
- see instructions for angle
- set
lldbinit
to
settings append target.source-map ../../ /Users/gman/src/chromium/src/third_party/dawn/
settings append target.source-map . /Users/gman/src/chromium/src/third_party/dawn/out/Debug
settings append target.process.thread.step-avoid-regexp ^Matcher
settings append target.process.thread.step-avoid-regexp ^DawnTestBase::
settings append target.process.thread.step-avoid-regexp ^internal::
settings append target.process.thread.step-avoid-regexp ^testing::
autoninja -C cmake-build/
cd src/chromium/src/third_party/dawn
../../testing/scripts/run_gpu_integration_test_as_googletest.py ../../content/test/gpu/run_gpu_integration_test.py --isolated-script-test-output=$T/output.json --isolated-script-test-perf-output=$T/perftest-output.json webgpu_cts --show-stdout --browser=release --passthrough -v --extra-browser-args=--enable-logging=stderr "--test-filter=*image_copy*" --retry-limit=3 --jobs=4
remove --test-filter
to run all of them
note: tests are run from ./out/Release/gen/third_party/dawn/third_party/webgpu-cts
cd $S/gpuweb/cts
node tools/run_wpt_ref_tests /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome <filter>
The filter is a simple str.contains(filter)
(see above)
- checkout the tests in
src/chromium/src/third_party/webgpu-cts/src
cd $S/chromuium/src/third_party/webgpu-cts
rm -rf src
git clone $S/gpuweb/cts src
Each time you change a test you need to re-generate the CTS tests
(cd $S/chromium/src && ~/bin/depot_tools/python-bin/python3 third_party/webgpu-cts/scripts/gen_ts_dep_lists.py && ~/bin/depot_tools/python-bin/python3 third_party/webgpu-cts/scripts/run_regenerate_internal_cts_html.py && autoninja -C out/Release webgpu_blink_web_tests)
Then you can run a test, for example
(cd $S/chromium/src && ./out/Release/bin/run_webgpu_blink_web_tests --target Release --flag-specific=webgpu --isolated-script-test-filter='wpt_internal/webgpu/web_platform/reftests/canvas_composite_alpha_bgra8unorm_premultiplied_copy.https.html')
wildcards also work
(cd $S/chromium/src && ./out/Release/bin/run_webgpu_blink_web_tests --target Release --flag-specific=webgpu --isolated-script-test-filter='wpt_internal/webgpu/web_platform/reftests/*')
You can open the results with
open $S/chromium/src/out/Release/layout-test-results/results.html
Only if a test fails will it keep the 2 .PNG screen captures around in $S/chromium/src/out/Release/layout-test-results/wpt_internal/webgpu/web_platform/reftests/
./tools/run run-cts --backend metal --cts=third_party/webgpu-cts/ --node=/Users/gman/src/chromium/src/third_party/dawn/third_party/node/node-darwin-arm64/bin/node --dawn-node=./cmake-build/dawn.node 'webgpu:api,operation,command_buffer,image_copy:rowsPerImage_and_bytesPerRow:*'
or with local cts
./tools/run run-cts --backend metal --cts=$S/gpuweb/cts/ --node=/Users/gman/src/chromium/src/third_party/dawn/third_party/node/node-darwin-arm64/bin/node --dawn-node=./cmake-build/dawn.node 'webgpu:api,operation,command_buffer,image_copy:rowsPerImage_and_bytesPerRow:*'
out/Debug/dawn_end2end_tests "--gtest_filter=CopyTests_T2B*" --enable-backend-validation
std::ostringstream s;
s << absl::StrFormat("[%s]:", texture->GetFormat().format) << ", size:(" << texture->GetSize().width << ", " << texture->GetSize().height << ", " << texture->GetSize().depthOrArrayLayers << "), mip: " << src.mipLevel << "\n";
s << "copy (" << copyInfo.textureOrigin.x << ", " << copyInfo.textureOrigin.y << ", " << copyInfo.textureOrigin.z << ")"
<< ", (" << copyInfo.copyExtent.width << ", " << copyInfo.copyExtent.height << ", "<< copyInfo.copyExtent.depthOrArrayLayers << ")\n"
<< " bufferOffset: " << bufferOffset << "\n"
<< " bytesPerRow: " << copyInfo.bytesPerRow << "\n"
<< " bytesPerImage: " << copyInfo.bytesPerImage << "\n";
std::cerr << s.str();
Build swiftshader, and set VK_ICD_FILENAMES
to the vk_swiftshader_icd.json
file in the output directory. Example:
VK_ICD_FILENAMES=path_to_vk_swiftshader_icd.json tools/run run-cts 'webgpu:shader,execution,expression,binary,f16_subtraction:*'