[LNT] r374305 - [LNT] Python 3 support: stable showtests output
Thomas Preud'homme via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 03:35:56 PDT 2019
Author: thopre
Date: Thu Oct 10 03:35:55 2019
New Revision: 374305
URL: http://llvm.org/viewvc/llvm-project?rev=374305&view=rev
Log:
[LNT] Python 3 support: stable showtests output
lnt showtests output depends on the iteration order of a set, which has
no guarantee whatsoever. This makes the result of test
tests/lnttool/showtests.shtest unstable in particular accross Python 2
and 3. This commit makes the lnt.tests constructor return a new sorted
list instead of the set, thus guaranteeing a stable output of lnt
showtests. It also lists tests in alphabetical order which makes it
nicer for users.
Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls
Reviewed By: cmatthews
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D68220
Modified:
lnt/trunk/lnt/tests/__init__.py
lnt/trunk/tests/lnttool/showtests.shtest
Modified: lnt/trunk/lnt/tests/__init__.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/__init__.py?rev=374305&r1=374304&r2=374305&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/__init__.py (original)
+++ lnt/trunk/lnt/tests/__init__.py Thu Oct 10 03:35:55 2019
@@ -12,7 +12,7 @@ def get_names():
Return the list of known built-in test names.
"""
- return _known_tests
+ return sorted(_known_tests)
def get_module(name):
Modified: lnt/trunk/tests/lnttool/showtests.shtest
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lnttool/showtests.shtest?rev=374305&r1=374304&r2=374305&view=diff
==============================================================================
--- lnt/trunk/tests/lnttool/showtests.shtest (original)
+++ lnt/trunk/tests/lnttool/showtests.shtest Thu Oct 10 03:35:55 2019
@@ -1,5 +1,5 @@
# RUN: lnt showtests | FileCheck %s
# CHECK: Available tests:
# CHECK-NEXT: compile - Single file compile-time performance testing
-# CHECK-NEXT: test_suite - LLVM test-suite
# CHECK-NEXT: nt - LLVM test-suite compile and execution tests
+# CHECK-NEXT: test_suite - LLVM test-suite
More information about the llvm-commits
mailing list