From 22daca166bbc412345fc60d4f60646d6d2f3ada0 Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 4 Oct 2021 14:54:37 +0000 Subject: [PATCH] cts: Change uniqueId() parameter to string. Add how-to-contribute to description. - Update the spec version used to: https://www.w3.org/TR/2021/WD-WGSL-20210929/ - replace extra white spaces with "\s" instead of "\n" - github PR: https://github.com/gpuweb/cts/pull/770 Bug: tint:1189 Change-Id: Ib8d0aaf57eac3fff4fd6943b4a3d2d0a691a9a0d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65740 Kokoro: Kokoro Reviewed-by: Ben Clayton Commit-Queue: Sarah Mashayekhi --- tools/src/cmd/get-test-plan/main.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/src/cmd/get-test-plan/main.go b/tools/src/cmd/get-test-plan/main.go index 6b2f69173e..cb32c59431 100644 --- a/tools/src/cmd/get-test-plan/main.go +++ b/tools/src/cmd/get-test-plan/main.go @@ -48,7 +48,7 @@ import ( const ( toolName = "get-test-plan" specPath = "https://www.w3.org/TR/WGSL/" - specVersionUsed = "https://www.w3.org/TR/2021/WD-WGSL-20210910/" + specVersionUsed = "https://www.w3.org/TR/2021/WD-WGSL-20210929/" ) var ( @@ -673,7 +673,7 @@ var ( // `float abs: // T is f32 or vecN abs(e: T ) -> T Returns the absolute value of e (e.g. e with a positive sign bit). Component-wise when T is a vector. (GLSLstd450Fabs)` func cleanUpString(in string) string { - out := reCleanUpString.ReplaceAllString(in, "\n") + out := reCleanUpString.ReplaceAllString(in, " ") out = reSpacePlusTwo.ReplaceAllString(out, " ") //`§.` is not a valid character for a cts description // ie. this is invalid: g.test().desc(`§.`) @@ -963,7 +963,7 @@ func isBuiltinFunctionRule(r rule) bool { func testPlan(r rule) string { sb := strings.Builder{} sb.WriteString(fmt.Sprintf(unImplementedTestTemplate, r.TestName, - r.Sha, "`\n"+r.URL+"\n"+r.Description+"\n`")) + r.Sha, "`\n"+r.URL+"\n"+r.Description+"\n"+howToContribute+"`")) return sb.String() } @@ -980,17 +980,20 @@ export const g = makeTestGroup(ShaderValidationTest); executionTestHeader = `export const description = %v; import { makeTestGroup } from '../../../../common/framework/test_group.js'; - -import { GPUTest } from '../../../gpu_test.js' +import { GPUTest } from '../../../gpu_test.js'; export const g = makeTestGroup(GPUTest); ` unImplementedTestTemplate = `g.test('%v') - .uniqueId(0x%v) + .uniqueId('%v') .desc( %v ) .params(u => u.combine('placeHolder1', ['placeHolder2', 'placeHolder3'])) .unimplemented(); +` + howToContribute = ` +Please read the following guidelines before contributing: +https://github.com/gpuweb/cts/blob/main/docs/plan_autogen.md ` )