Fix inclusive language presubmit

The current presubmit has the filter inverted so it would only attempt
to match the filtered files. The file name also has to be converted to
`LocalPath` otherwise it's attempting to compare a python object to a
string and always fails to match.

Bug: dawn:1339
Change-Id: Ie7712dee60f6b9df2cb78c9feab11769f7ea1f02
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair
2022-04-19 22:25:45 +00:00
committed by Dawn LUCI CQ
parent 6a3373e419
commit fb5a492787
88 changed files with 574 additions and 534 deletions

View File

@@ -35,20 +35,20 @@ def compile_src(out_dir):
shutil.rmtree(out_dir)
run_tsc_ignore_errors([
'--project',
os.path.join(webgpu_cts_root_dir, 'tsconfig.json'),
'--outDir',
"--project",
os.path.join(webgpu_cts_root_dir, "tsconfig.json"),
"--outDir",
out_dir,
'--noEmit',
'false',
'--noEmitOnError',
'false',
'--declaration',
'false',
'--sourceMap',
'false',
'--target',
'ES2017',
"--noEmit",
"false",
"--noEmitOnError",
"false",
"--declaration",
"false",
"--sourceMap",
"false",
"--target",
"ES2017",
])
@@ -59,43 +59,43 @@ def compile_src_for_node(out_dir, additional_args=None, clean=True):
shutil.rmtree(out_dir)
args = [
'--project',
os.path.join(webgpu_cts_root_dir, 'node.tsconfig.json'),
'--outDir',
"--project",
os.path.join(webgpu_cts_root_dir, "node.tsconfig.json"),
"--outDir",
out_dir,
'--noEmit',
'false',
'--noEmitOnError',
'false',
'--declaration',
'false',
'--sourceMap',
'false',
'--target',
'ES6',
"--noEmit",
"false",
"--noEmitOnError",
"false",
"--declaration",
"false",
"--sourceMap",
"false",
"--target",
"ES6",
]
args.extend(additional_args)
run_tsc_ignore_errors(args)
if __name__ == '__main__':
if __name__ == "__main__":
if len(sys.argv) != 2:
print('Usage: compile_src.py GEN_DIR')
print("Usage: compile_src.py GEN_DIR")
sys.exit(1)
gen_dir = sys.argv[1]
# Compile the CTS src.
compile_src(os.path.join(gen_dir, 'src'))
compile_src_for_node(os.path.join(gen_dir, 'src-node'))
compile_src(os.path.join(gen_dir, "src"))
compile_src_for_node(os.path.join(gen_dir, "src-node"))
# Run gen_listings.js to overwrite the dummy src/webgpu/listings.js created
# Run gen_listings.js to overwrite the placeholder src/webgpu/listings.js created
# from transpiling src/
RunNode([
os.path.join(gen_dir, 'src-node', 'common', 'tools',
'gen_listings.js'),
'--no-validate',
os.path.join(gen_dir, 'src'),
os.path.join(gen_dir, 'src-node', 'webgpu'),
os.path.join(gen_dir, "src-node", "common", "tools",
"gen_listings.js"),
"--no-validate",
os.path.join(gen_dir, "src"),
os.path.join(gen_dir, "src-node", "webgpu"),
])