This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Python 3 support: sort benchmark regressing
ClosedPublic

Authored by thopre on Oct 10 2019, 8:45 AM.

Details

Summary

Test server/ui/change_processing.py makes an assumption about the order
in which benchmark are listed when a regression occurs but these are put
in a set before being iterated over for printing. Since set have no
guarantee of order, the test is fragile and fails on Python 3 due to
different implementation of Set. This commit sort the benchmark when
printing them so that the output is consistent. It also adapts the
testcase accordingly.

Event Timeline

thopre created this revision.Oct 10 2019, 8:45 AM
PrzemekWirkus accepted this revision.Dec 5 2019, 7:15 AM
PrzemekWirkus added inline comments.
tests/server/ui/change_processing.py
214–216

I would still add a comment here that "bar, foo" should be in alphabetical order to mach assert with sorted().

This revision is now accepted and ready to land.Dec 5 2019, 7:15 AM
thopre updated this revision to Diff 232343.Dec 5 2019, 7:29 AM
thopre marked 2 inline comments as done.

Add comment to explain assumptions

tests/server/ui/change_processing.py
214–216

Good point.

PrzemekWirkus accepted this revision.Dec 5 2019, 7:31 AM
thopre closed this revision.Dec 5 2019, 7:40 AM
thopre added a comment.Dec 5 2019, 7:41 AM

Committed as d836856b7ff9be352f19faa90a16be2b05d0e4bb