diff options
| author | tedin7 <tommasoderosa94@gmail.com> | 2026-11-23 02:07:06 +0100 |
|---|---|---|
| committer | tedin7 <tommasoderosa94@gmail.com> | 2026-11-23 02:07:06 +0100 |
| commit | 91a89baac64b7e41798c4b2dca788020a5b7c8e6 (patch) | |
| tree | e29eac0ab86f38e7bcd36fa7a2a5f1288725d0dd /tests/test_pk16_diff.py | |
| parent | 03b09a086592a197db64d91655c6e65c30764d96 (diff) | |
diff fuzzers: exit 2 when every program was skipped, not 0 (vint, pk16, salu, sdwa, sad)
Diffstat (limited to 'tests/test_pk16_diff.py')
| -rw-r--r-- | tests/test_pk16_diff.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_pk16_diff.py b/tests/test_pk16_diff.py index 372f066fe..927745930 100644 --- a/tests/test_pk16_diff.py +++ b/tests/test_pk16_diff.py | |||
| @@ -206,6 +206,18 @@ class Cli(unittest.TestCase): | |||
| 206 | self.assertEqual(rc, 1) | 206 | self.assertEqual(rc, 1) |
| 207 | self.assertIn("MISMATCH", out) | 207 | self.assertIn("MISMATCH", out) |
| 208 | 208 | ||
| 209 | def test_a_run_where_every_program_was_skipped_is_not_a_success(self): | ||
| 210 | def refuse(lines, *args): | ||
| 211 | raise d.Skip("unsupported form") | ||
| 212 | real = d.translated | ||
| 213 | try: | ||
| 214 | d.translated = refuse | ||
| 215 | rc, out = self.main("--programs", "3", "--seed", "1", "--ops", "v_pk_max_u16") | ||
| 216 | finally: | ||
| 217 | d.translated = real | ||
| 218 | self.assertEqual(rc, 2, out) | ||
| 219 | self.assertIn("no program ran: every one was skipped", out) | ||
| 220 | |||
| 209 | def test_hardware_oracle_without_the_tools_exits_77(self): | 221 | def test_hardware_oracle_without_the_tools_exits_77(self): |
| 210 | env = dict(os.environ, LEONIDA_AMD_CLANG=str(TOOL.parent / "no-such-clang.exe")) | 222 | env = dict(os.environ, LEONIDA_AMD_CLANG=str(TOOL.parent / "no-such-clang.exe")) |
| 211 | r = subprocess.run([sys.executable, "-I", str(TOOL), "--oracle", "hw", "--programs", "3"], | 223 | r = subprocess.run([sys.executable, "-I", str(TOOL), "--oracle", "hw", "--programs", "3"], |