Fix gen benchmark script. The script was using the wrong variable when writing the files and always attempting to use a temp folder, even when not doing the stale cache check. Fix variables to correct usage. Change-Id: I8140f4565354ab71cbe960ba7b95babc74b0f7e0 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/257914 Commit-Queue: James Price <jrprice@google.com> Reviewed-by: James Price <jrprice@google.com> Auto-Submit: dan sinclair <dsinclair@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/cmd/bench/generate_benchmark_inputs.py b/src/tint/cmd/bench/generate_benchmark_inputs.py index b750d99..6e722e6 100644 --- a/src/tint/cmd/bench/generate_benchmark_inputs.py +++ b/src/tint/cmd/bench/generate_benchmark_inputs.py
@@ -104,9 +104,9 @@ subprocess.run(tint_args, check=True) # Rewrite the file without CRLF line endings. - with open(tmp_wgsl_path, 'r') as file: + with open(wgsl_path, 'r') as file: wgsl = file.read() - with open(tmp_wgsl_path, 'w', newline='\n') as file: + with open(wgsl_path, 'w', newline='\n') as file: file.write(wgsl) # Check if the generated content is different to the current file.