[PATCH] D18089: [lit] Hack lit to allow a test suite to request that it is run "early".
Filipe Cabecinhas via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 10:10:12 PST 2016
filcab added a subscriber: filcab.
================
Comment at: utils/lit/lit/main.py:370
@@ -369,2 +369,3 @@
else:
- run.tests.sort(key = lambda result_test: result_test.getFullName())
+ run.tests.sort(key = lambda t: (('a' if t.isEarlyTest() else 'b') +
+ t.getFullName()))
----------------
Maybe `run.tests.sort(key = lambda x: (x.isEarlyTest(), x.getFullName())`?
The manual says: "tuples are compared lexicographically; the first items are compared; if they are the same then the second items are compared, and so on.". You'd be able to avoid that nasty string concatenation.
http://reviews.llvm.org/D18089
More information about the llvm-commits
mailing list