diff options
author | Zachary Turner <zturner@google.com> | 2017-06-30 16:01:30 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-06-30 16:01:30 +0000 |
commit | 5a321ee929f41e6ab136995f11c2d4e48e625077 (patch) | |
tree | dcd246108322f187d458b343ebe5cc85bb785cab /test/Other | |
parent | 333b6cb76040b4d32705e1f16f96d18b2ad7e4d5 (diff) |
[lit] Clean output directories before running tests.
Presently lit leaks files in the tests' output directories.
Specifically, if a test creates output files, lit makes no
effort to remove them prior to the next test run. This is
problematic because it leads to false positives whenever a
test passes because stale files were present. In general
it is a source of flakiness that should be removed.
This patch addresses this by building the list of all test
directories that are part of the current run set, and then
deleting those directories and recreating them anew. This
gives each test a clean baseline to start from.
Differential Revision: https://reviews.llvm.org/D34732
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r-- | test/Other/lit-globbing.ll | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/test/Other/lit-globbing.ll b/test/Other/lit-globbing.ll index 5a668a90a40..b60510ab8b2 100644 --- a/test/Other/lit-globbing.ll +++ b/test/Other/lit-globbing.ll @@ -1,28 +1,28 @@ -RUN: echo TA > %T/TA.txt
-RUN: echo TB > %T/TB.txt
-RUN: echo TAB > %T/TAB.txt
-
-RUN: echo %T/TA* | FileCheck -check-prefix=STAR %s
-RUN: echo %T/'TA'* | FileCheck -check-prefix=STAR %s
-RUN: echo %T/T'A'* | FileCheck -check-prefix=STAR %s
-
-RUN: echo %T/T?.txt | FileCheck -check-prefix=QUESTION %s
-RUN: echo %T/'T'?.txt | FileCheck -check-prefix=QUESTION %s
-
-RUN: echo %T/T??.txt | FileCheck -check-prefix=QUESTION2 %s
-RUN: echo %T/'T'??.txt | FileCheck -check-prefix=QUESTION2 %s
-
-RUN: echo 'T*' 'T?.txt' 'T??.txt' | FileCheck -check-prefix=QUOTEDARGS %s
-
-STAR-NOT: TB.txt
-STAR: {{(TA.txt.*TAB.txt|TAB.txt.*TA.txt)}}
-
-QUESTION-NOT: TAB.txt
-QUESTION: {{(TA.txt.*TB.txt|TB.txt.*TA.txt)}}
-
-QUESTION2-NOT: TA.txt
-QUESTION2-NOT: TB.txt
-QUESTION2: TAB.txt
-
-QUOTEDARGS-NOT: .txt
-QUOTEDARGS: T* T?.txt T??.txt
+RUN: echo XXA > %T/XXA.txt +RUN: echo XXB > %T/XXB.txt +RUN: echo XXAB > %T/XXAB.txt + +RUN: echo %T/XXA* | FileCheck -check-prefix=STAR %s +RUN: echo %T/'XXA'* | FileCheck -check-prefix=STAR %s +RUN: echo %T/XX'A'* | FileCheck -check-prefix=STAR %s + +RUN: echo %T/XX?.txt | FileCheck -check-prefix=QUESTION %s +RUN: echo %T/'XX'?.txt | FileCheck -check-prefix=QUESTION %s + +RUN: echo %T/XX??.txt | FileCheck -check-prefix=QUESTION2 %s +RUN: echo %T/'XX'??.txt | FileCheck -check-prefix=QUESTION2 %s + +RUN: echo 'XX*' 'XX?.txt' 'XX??.txt' | FileCheck -check-prefix=QUOTEDARGS %s + +STAR-NOT: XXB.txt +STAR: {{(XXA.txt.*XXAB.txt|XXAB.txt.*XXA.txt)}} + +QUESTION-NOT: XXAB.txt +QUESTION: {{(XXA.txt.*XXB.txt|XXB.txt.*XXA.txt)}} + +QUESTION2-NOT: XXA.txt +QUESTION2-NOT: XXB.txt +QUESTION2: XXAB.txt + +QUOTEDARGS-NOT: .txt +QUOTEDARGS: XX* XX?.txt XX??.txt |