diff options
author | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-10-10 10:35:55 +0000 |
---|---|---|
committer | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-10-10 10:35:55 +0000 |
commit | 48a115b4b72b9079bba86f34e22996dc222c88e1 (patch) | |
tree | d91edb5ba91f69ee35f0b31a11f6041d9a730a0b | |
parent | dd7967deb471a56b066dd040eac10839c483f4c4 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/lnt/trunk@374305 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lnt/tests/__init__.py | 2 | ||||
-rw-r--r-- | tests/lnttool/showtests.shtest | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lnt/tests/__init__.py b/lnt/tests/__init__.py index b668776..9ae3681 100644 --- a/lnt/tests/__init__.py +++ b/lnt/tests/__init__.py @@ -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): diff --git a/tests/lnttool/showtests.shtest b/tests/lnttool/showtests.shtest index 08dc0fa..858c728 100644 --- a/tests/lnttool/showtests.shtest +++ b/tests/lnttool/showtests.shtest @@ -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 |