upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tools/cf_diff.py
diff options
context:
space:
mode:
authortedin7 <tommasoderosa94@gmail.com>2026-11-23 02:29:16 +0100
committertedin7 <tommasoderosa94@gmail.com>2026-11-23 02:29:16 +0100
commit6caeae4ac6469f03f419f7623e4610fb1d69821d (patch)
tree518d558d16af260edad6521a098e98f342f63689 /tools/cf_diff.py
parentda96d1fac99e1b204902f683f969ef2b86a33525 (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.py10
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
33Exit code 0 when every program matches, 1 on a mismatch (case, seed, lane, the expected and actual words and the 33Exit code 0 when every program matches, 1 on a mismatch (case, seed, lane, the expected and actual words and the
34listing; with --minimize also a reduced listing), 2 on harness errors. Skips are counted with reasons. 34listing; with --minimize also a reduced listing), 2 on harness errors or when every program was skipped (nothing was
35compared). Skips are counted with reasons.
35""" 36"""
36import argparse 37import argparse
37import gc 38import 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
661if __name__ == "__main__": 667if __name__ == "__main__":