diff options
| author | tedin7 <tommasoderosa94@gmail.com> | 2026-11-23 02:29:16 +0100 |
|---|---|---|
| committer | tedin7 <tommasoderosa94@gmail.com> | 2026-11-23 02:29:16 +0100 |
| commit | 6caeae4ac6469f03f419f7623e4610fb1d69821d (patch) | |
| tree | 518d558d16af260edad6521a098e98f342f63689 /tools/cf_diff.py | |
| parent | da96d1fac99e1b204902f683f969ef2b86a33525 (diff) | |
cf_diff, mem_diff, shader_diff, fmisc_diff: exit 2 when every program was skipped
Diffstat (limited to 'tools/cf_diff.py')
| -rw-r--r-- | tools/cf_diff.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/cf_diff.py b/tools/cf_diff.py index 5f1ce303a..4c1207069 100644 --- a/tools/cf_diff.py +++ b/tools/cf_diff.py | |||
| @@ -31,7 +31,8 @@ Usage: | |||
| 31 | python -I tools/cf_diff.py --seed S --program K --show [--minimize] # print (and shrink) one program | 31 | python -I tools/cf_diff.py --seed S --program K --show [--minimize] # print (and shrink) one program |
| 32 | 32 | ||
| 33 | Exit code 0 when every program matches, 1 on a mismatch (case, seed, lane, the expected and actual words and the | 33 | Exit code 0 when every program matches, 1 on a mismatch (case, seed, lane, the expected and actual words and the |
| 34 | listing; with --minimize also a reduced listing), 2 on harness errors. Skips are counted with reasons. | 34 | listing; with --minimize also a reduced listing), 2 on harness errors or when every program was skipped (nothing was |
| 35 | compared). Skips are counted with reasons. | ||
| 35 | """ | 36 | """ |
| 36 | import argparse | 37 | import argparse |
| 37 | import gc | 38 | import gc |
| @@ -655,7 +656,12 @@ def main(argv=None): | |||
| 655 | print(f" ... {len(failures) - 10} more") | 656 | print(f" ... {len(failures) - 10} more") |
| 656 | if counts["harness-error"]: | 657 | if counts["harness-error"]: |
| 657 | return 2 | 658 | return 2 |
| 658 | return 1 if counts["mismatch"] else 0 | 659 | if counts["mismatch"]: |
| 660 | return 1 | ||
| 661 | if not counts["pass"]: | ||
| 662 | print("no program ran: every one was skipped") | ||
| 663 | return 2 | ||
| 664 | return 0 | ||
| 659 | 665 | ||
| 660 | 666 | ||
| 661 | if __name__ == "__main__": | 667 | if __name__ == "__main__": |