Changed RFrac equality in scripts

Now, fractions are considered equal if they have the same ratio:

- 6/6 == 12/12 => True
- 3/6 == 3/12  => False
- 1/6 == 2/12  => True

It's interesting to note this implementation is actually more
numerically stable than float comparison, though that wasn't really the
goal.

The main reason for this is to allow other fields to take over when
sorting multi-field fractional data: cov (lines + branches), testmarks
(passed + time), etc. Before, sorting would usually stop after
mismatched fraction fields, which wasn't all that useful.
This commit is contained in:
Christopher Haster
2024-05-28 14:56:53 -05:00
parent e247135805
commit 37f738cc71
3 changed files with 23 additions and 7 deletions
+1 -1
View File
@@ -393,7 +393,7 @@ test-list list-tests: test-runner
## Summarize the test results
.PHONY: testmarks
testmarks: SUMMARYFLAGS+=-Stime
testmarks: SUMMARYFLAGS+=-spassed -Stime
testmarks: $(TEST_CSV) $(BUILDDIR)/lfs.test.csv
$(strip ./scripts/summary.py $(TEST_CSV) \
-bsuite \