diff options
author | Alon Zakai <azakai@google.com> | 2024-12-18 09:18:35 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-18 09:18:35 -0800 |
commit | c744bd18ce73b82cf23e64728a8167c61ae4e24a (patch) | |
tree | 2a117efafd4fc04121232b44a2d4dd45a1e6da2f /scripts | |
parent | d444abdc9fcee98715813f03e28aa7070879c414 (diff) | |
download | binaryen-c744bd18ce73b82cf23e64728a8167c61ae4e24a.tar.gz binaryen-c744bd18ce73b82cf23e64728a8167c61ae4e24a.tar.bz2 binaryen-c744bd18ce73b82cf23e64728a8167c61ae4e24a.zip |
[NFC] Improve ClusterFuzz testing (#7157)
1. Error on retrying due to a wasm-opt issue, locally (in production, we
don't want to error on ClusterFuzz).
2. Move some asserts from test_run_py to the helper generate_testcases
(so that the asserts happen in all callers).
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/fuzz_opt.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index ca7c9e355..2fb64941f 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -1654,10 +1654,15 @@ class ClusterFuzz(TestCaseHandler): os.unlink(f) # Call run.py(), similarly to how ClusterFuzz does. - run([sys.executable, - os.path.join(self.clusterfuzz_dir, 'run.py'), - '--output_dir=' + os.getcwd(), - '--no_of_files=1']) + out = run([sys.executable, + os.path.join(self.clusterfuzz_dir, 'run.py'), + '--output_dir=' + os.getcwd(), + '--no_of_files=1']) + + # We should not see any mention of a wasm-opt error that caused a + # retry. On production ClusterFuzz this is not an error, but we do want + # to know about such issues, as they may be real bugs in wasm-opt. + assert 'retry' not in out, out # We should see the two files. assert os.path.exists(fuzz_file) |