Skip to content

Commit

Permalink
Shorten suite name in query
Browse files Browse the repository at this point in the history
This allows using something like
`gpu_tests.webgpu_cts_integration_test.WebGpuCtsIntegrationTest.webgpu:web_platform,canvas,readbackFromWebGPUCanvas:drawTo2DCanvas:format="bgra8unorm";alphaMode="opaque";colorSpace="display-p3";webgpuCanvasType="offscreen";canvas2DType="onscreen"`
as a query
  • Loading branch information
greggman committed Jan 24, 2024
1 parent c9f7acb commit af6c52e
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 105 deletions.
17 changes: 16 additions & 1 deletion src/common/runtime/helper/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,18 @@ function convertPathLikeToQuery(queryOrPath: string) {
: queryOrPath;
}

/**
* Convert long suite names (the part before the first colon) to the
* shortest last word
* foo.bar.moo:test/subtest/foo -> moo:test/subtest/foo
*/
function shortenSuiteName(query: string) {
const parts = query.split(':');
// converts foo.bar.moo to moo
const suite = parts.shift()?.replace(/.*\.(\w+)$/, '$1');
return [suite, ...parts].join(':');
}

/**
* Given a test query string in the form of `suite:foo,bar,moo&opt1=val1&opt2=val2
* returns the query and the options.
Expand All @@ -139,7 +151,10 @@ export function parseSearchParamLikeWithOptions<Type extends CTSOptions>(
options: Type;
} {
const searchString = query.includes('q=') || query.startsWith('?') ? query : `q=${query}`;
const queries = new URLSearchParams(searchString).getAll('q').map(convertPathLikeToQuery);
const queries = new URLSearchParams(searchString)
.getAll('q')
.map(convertPathLikeToQuery)
.map(shortenSuiteName);
const options = getOptionsInfoFromSearchString(optionsInfos, searchString);
return { queries, options };
}
Expand Down
208 changes: 104 additions & 104 deletions src/resources/cache/hashes.json
Original file line number Diff line number Diff line change
@@ -1,106 +1,106 @@
{
"webgpu/shader/execution/binary/af_addition.bin": "cc376b37",
"webgpu/shader/execution/binary/af_logical.bin": "581be442",
"webgpu/shader/execution/binary/af_division.bin": "ca179ff2",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "209e6965",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "e1226295",
"webgpu/shader/execution/binary/af_multiplication.bin": "3c07556a",
"webgpu/shader/execution/binary/af_remainder.bin": "2a4fd923",
"webgpu/shader/execution/binary/af_subtraction.bin": "74fafb7a",
"webgpu/shader/execution/binary/f16_addition.bin": "54274ca7",
"webgpu/shader/execution/binary/f16_logical.bin": "b6e1c3f7",
"webgpu/shader/execution/binary/f16_division.bin": "b0798477",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "9efe8261",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "3b8fe08a",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "495f7d20",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "738b53d5",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "66dea74b",
"webgpu/shader/execution/binary/f16_multiplication.bin": "fc8cf78",
"webgpu/shader/execution/binary/f16_remainder.bin": "da96b25a",
"webgpu/shader/execution/binary/f16_subtraction.bin": "58a68e4a",
"webgpu/shader/execution/binary/f32_addition.bin": "4b64583c",
"webgpu/shader/execution/binary/f32_logical.bin": "43089982",
"webgpu/shader/execution/binary/f32_division.bin": "3dbe6d9f",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "dd8ff303",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "d51044f4",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "206f8b97",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "216f822b",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "60c1da25",
"webgpu/shader/execution/binary/f32_multiplication.bin": "55439f76",
"webgpu/shader/execution/binary/f32_remainder.bin": "962ef47d",
"webgpu/shader/execution/binary/f32_subtraction.bin": "867a37cd",
"webgpu/shader/execution/binary/i32_arithmetic.bin": "300eab87",
"webgpu/shader/execution/binary/i32_comparison.bin": "efa097b6",
"webgpu/shader/execution/binary/u32_arithmetic.bin": "a83b5a8",
"webgpu/shader/execution/binary/u32_comparison.bin": "37aae6eb",
"webgpu/shader/execution/abs.bin": "74aa7896",
"webgpu/shader/execution/acos.bin": "df364e7",
"webgpu/shader/execution/acosh.bin": "218177b5",
"webgpu/shader/execution/asin.bin": "cf90fb40",
"webgpu/shader/execution/asinh.bin": "e88426c0",
"webgpu/shader/execution/atan.bin": "30e5cdba",
"webgpu/shader/execution/atan2.bin": "2cb9c01c",
"webgpu/shader/execution/atanh.bin": "cf945e3e",
"webgpu/shader/execution/bitcast.bin": "bd29318f",
"webgpu/shader/execution/ceil.bin": "c89008e0",
"webgpu/shader/execution/clamp.bin": "cf06c601",
"webgpu/shader/execution/cos.bin": "2bbc33",
"webgpu/shader/execution/cosh.bin": "6980ff40",
"webgpu/shader/execution/cross.bin": "16eba697",
"webgpu/shader/execution/degrees.bin": "b7b360b3",
"webgpu/shader/execution/determinant.bin": "c35288bd",
"webgpu/shader/execution/distance.bin": "a5c99ede",
"webgpu/shader/execution/dot.bin": "9ed123dd",
"webgpu/shader/execution/exp.bin": "d594d140",
"webgpu/shader/execution/exp2.bin": "4b15e525",
"webgpu/shader/execution/faceForward.bin": "8c5e4c59",
"webgpu/shader/execution/floor.bin": "f2058b59",
"webgpu/shader/execution/fma.bin": "295ebf2",
"webgpu/shader/execution/fract.bin": "7dc6ac86",
"webgpu/shader/execution/frexp.bin": "f33cefc",
"webgpu/shader/execution/inverseSqrt.bin": "96a23362",
"webgpu/shader/execution/ldexp.bin": "750f20dc",
"webgpu/shader/execution/length.bin": "5ff28a30",
"webgpu/shader/execution/log.bin": "4a89a92e",
"webgpu/shader/execution/log2.bin": "fc5c8930",
"webgpu/shader/execution/max.bin": "d5ec21f8",
"webgpu/shader/execution/min.bin": "3d162b98",
"webgpu/shader/execution/mix.bin": "d265c17b",
"webgpu/shader/execution/modf.bin": "bdbf837e",
"webgpu/shader/execution/normalize.bin": "1493faef",
"webgpu/shader/execution/pack2x16float.bin": "db16cd5e",
"webgpu/shader/execution/pow.bin": "e170f03b",
"webgpu/shader/execution/quantizeToF16.bin": "5f6adf6a",
"webgpu/shader/execution/radians.bin": "ba8aa775",
"webgpu/shader/execution/reflect.bin": "5a44a6bc",
"webgpu/shader/execution/refract.bin": "20905378",
"webgpu/shader/execution/round.bin": "f3ed343",
"webgpu/shader/execution/saturate.bin": "83255982",
"webgpu/shader/execution/sign.bin": "89153648",
"webgpu/shader/execution/sin.bin": "a0ce578b",
"webgpu/shader/execution/sinh.bin": "dacde8f8",
"webgpu/shader/execution/smoothstep.bin": "497d430",
"webgpu/shader/execution/sqrt.bin": "1c00b1c",
"webgpu/shader/execution/step.bin": "c4432092",
"webgpu/shader/execution/tan.bin": "26d0a994",
"webgpu/shader/execution/tanh.bin": "d16dc4ff",
"webgpu/shader/execution/transpose.bin": "edbfdf6e",
"webgpu/shader/execution/trunc.bin": "1bc2032",
"webgpu/shader/execution/unpack2x16float.bin": "c7cbb7f9",
"webgpu/shader/execution/unpack2x16snorm.bin": "4673a",
"webgpu/shader/execution/unpack2x16unorm.bin": "5db86731",
"webgpu/shader/execution/unpack4x8snorm.bin": "a99a3399",
"webgpu/shader/execution/unpack4x8unorm.bin": "26831332",
"webgpu/shader/execution/unary/af_arithmetic.bin": "e82077ef",
"webgpu/shader/execution/unary/af_assignment.bin": "18c7424a",
"webgpu/shader/execution/unary/bool_conversion.bin": "4405b038",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "717193f7",
"webgpu/shader/execution/unary/f16_conversion.bin": "106fc817",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "a1123962",
"webgpu/shader/execution/unary/f32_conversion.bin": "ab27a511",
"webgpu/shader/execution/unary/i32_arithmetic.bin": "5486010b",
"webgpu/shader/execution/unary/i32_complement.bin": "ec548b43",
"webgpu/shader/execution/unary/i32_conversion.bin": "e77636a7",
"webgpu/shader/execution/unary/u32_complement.bin": "64732842",
"webgpu/shader/execution/unary/u32_conversion.bin": "9d69dfe1"
"webgpu/shader/execution/binary/af_addition.bin": "e2a6fa97",
"webgpu/shader/execution/binary/af_logical.bin": "f87033d7",
"webgpu/shader/execution/binary/af_division.bin": "b6608a1d",
"webgpu/shader/execution/binary/af_matrix_addition.bin": "26880f55",
"webgpu/shader/execution/binary/af_matrix_subtraction.bin": "2cabd6fc",
"webgpu/shader/execution/binary/af_multiplication.bin": "44267c8c",
"webgpu/shader/execution/binary/af_remainder.bin": "99e33c8c",
"webgpu/shader/execution/binary/af_subtraction.bin": "3bb5b279",
"webgpu/shader/execution/binary/f16_addition.bin": "8d3096b6",
"webgpu/shader/execution/binary/f16_logical.bin": "9777729",
"webgpu/shader/execution/binary/f16_division.bin": "9d58b04e",
"webgpu/shader/execution/binary/f16_matrix_addition.bin": "a0c77404",
"webgpu/shader/execution/binary/f16_matrix_matrix_multiplication.bin": "6bfe3a1f",
"webgpu/shader/execution/binary/f16_matrix_scalar_multiplication.bin": "354748aa",
"webgpu/shader/execution/binary/f16_matrix_subtraction.bin": "58dfb66c",
"webgpu/shader/execution/binary/f16_matrix_vector_multiplication.bin": "f999f684",
"webgpu/shader/execution/binary/f16_multiplication.bin": "b3fae008",
"webgpu/shader/execution/binary/f16_remainder.bin": "2af28c4a",
"webgpu/shader/execution/binary/f16_subtraction.bin": "daf481ef",
"webgpu/shader/execution/binary/f32_addition.bin": "1275af67",
"webgpu/shader/execution/binary/f32_logical.bin": "b4a0d63e",
"webgpu/shader/execution/binary/f32_division.bin": "1d78692",
"webgpu/shader/execution/binary/f32_matrix_addition.bin": "90da9e9a",
"webgpu/shader/execution/binary/f32_matrix_matrix_multiplication.bin": "3a6e178a",
"webgpu/shader/execution/binary/f32_matrix_scalar_multiplication.bin": "3c91a515",
"webgpu/shader/execution/binary/f32_matrix_subtraction.bin": "bf5b1139",
"webgpu/shader/execution/binary/f32_matrix_vector_multiplication.bin": "2b15a7",
"webgpu/shader/execution/binary/f32_multiplication.bin": "96662d61",
"webgpu/shader/execution/binary/f32_remainder.bin": "61feee9",
"webgpu/shader/execution/binary/f32_subtraction.bin": "39ba674",
"webgpu/shader/execution/binary/i32_arithmetic.bin": "ece05bfe",
"webgpu/shader/execution/binary/i32_comparison.bin": "6f1a5f8a",
"webgpu/shader/execution/binary/u32_arithmetic.bin": "fe793f15",
"webgpu/shader/execution/binary/u32_comparison.bin": "6f4cc9ce",
"webgpu/shader/execution/abs.bin": "a24702b4",
"webgpu/shader/execution/acos.bin": "6be8a261",
"webgpu/shader/execution/acosh.bin": "f0ee78c7",
"webgpu/shader/execution/asin.bin": "253f4af0",
"webgpu/shader/execution/asinh.bin": "3314584b",
"webgpu/shader/execution/atan.bin": "da8d08d7",
"webgpu/shader/execution/atan2.bin": "b954d4e1",
"webgpu/shader/execution/atanh.bin": "1b3f2d03",
"webgpu/shader/execution/bitcast.bin": "4e7c77c3",
"webgpu/shader/execution/ceil.bin": "ea0eceec",
"webgpu/shader/execution/clamp.bin": "c9cbd016",
"webgpu/shader/execution/cos.bin": "5a33f219",
"webgpu/shader/execution/cosh.bin": "eba59441",
"webgpu/shader/execution/cross.bin": "e1ca8519",
"webgpu/shader/execution/degrees.bin": "d4f9f7cc",
"webgpu/shader/execution/determinant.bin": "a1e37972",
"webgpu/shader/execution/distance.bin": "e012cbbc",
"webgpu/shader/execution/dot.bin": "4e4422fc",
"webgpu/shader/execution/exp.bin": "69d128c9",
"webgpu/shader/execution/exp2.bin": "8ff6b47c",
"webgpu/shader/execution/faceForward.bin": "9db6ba7c",
"webgpu/shader/execution/floor.bin": "390d4095",
"webgpu/shader/execution/fma.bin": "2f0cc932",
"webgpu/shader/execution/fract.bin": "d5adea9",
"webgpu/shader/execution/frexp.bin": "426d8896",
"webgpu/shader/execution/inverseSqrt.bin": "bb5fa342",
"webgpu/shader/execution/ldexp.bin": "efae4849",
"webgpu/shader/execution/length.bin": "fd465bc5",
"webgpu/shader/execution/log.bin": "fccd2720",
"webgpu/shader/execution/log2.bin": "79218514",
"webgpu/shader/execution/max.bin": "83d5bf02",
"webgpu/shader/execution/min.bin": "e3879019",
"webgpu/shader/execution/mix.bin": "9d656458",
"webgpu/shader/execution/modf.bin": "699020c0",
"webgpu/shader/execution/normalize.bin": "10b742c3",
"webgpu/shader/execution/pack2x16float.bin": "7bc9650c",
"webgpu/shader/execution/pow.bin": "75838277",
"webgpu/shader/execution/quantizeToF16.bin": "6e984214",
"webgpu/shader/execution/radians.bin": "9a0d018b",
"webgpu/shader/execution/reflect.bin": "4466e293",
"webgpu/shader/execution/refract.bin": "a2567635",
"webgpu/shader/execution/round.bin": "5b51d80a",
"webgpu/shader/execution/saturate.bin": "e4df7a6d",
"webgpu/shader/execution/sign.bin": "d487be2d",
"webgpu/shader/execution/sin.bin": "f163d263",
"webgpu/shader/execution/sinh.bin": "f1101f5a",
"webgpu/shader/execution/smoothstep.bin": "b1f55378",
"webgpu/shader/execution/sqrt.bin": "8bd7012b",
"webgpu/shader/execution/step.bin": "110a275",
"webgpu/shader/execution/tan.bin": "5459be1f",
"webgpu/shader/execution/tanh.bin": "80a6df0e",
"webgpu/shader/execution/transpose.bin": "f7044a92",
"webgpu/shader/execution/trunc.bin": "ed12ec64",
"webgpu/shader/execution/unpack2x16float.bin": "d23babe0",
"webgpu/shader/execution/unpack2x16snorm.bin": "4642a93c",
"webgpu/shader/execution/unpack2x16unorm.bin": "f6a97c9e",
"webgpu/shader/execution/unpack4x8snorm.bin": "6e14623",
"webgpu/shader/execution/unpack4x8unorm.bin": "4e898f1a",
"webgpu/shader/execution/unary/af_arithmetic.bin": "ee10c839",
"webgpu/shader/execution/unary/af_assignment.bin": "630efc9b",
"webgpu/shader/execution/unary/bool_conversion.bin": "e164da1a",
"webgpu/shader/execution/unary/f16_arithmetic.bin": "33e18928",
"webgpu/shader/execution/unary/f16_conversion.bin": "8fb6afc8",
"webgpu/shader/execution/unary/f32_arithmetic.bin": "50cfea21",
"webgpu/shader/execution/unary/f32_conversion.bin": "ea0858e9",
"webgpu/shader/execution/unary/i32_arithmetic.bin": "c18f10fb",
"webgpu/shader/execution/unary/i32_complement.bin": "5c92c508",
"webgpu/shader/execution/unary/i32_conversion.bin": "8170e9ba",
"webgpu/shader/execution/unary/u32_complement.bin": "b463fd72",
"webgpu/shader/execution/unary/u32_conversion.bin": "d1fa1bf3"
}

0 comments on commit af6c52e

Please sign in to comment.