summaryrefslogtreecommitdiffstats
path: root/llvm/test/Other/lit-globbing.ll
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-06-30 16:01:30 +0000
committerZachary Turner <zturner@google.com>2017-06-30 16:01:30 +0000
commit0955739b36bf64c96bf55c3b49335c1a54ed1b2d (patch)
tree7d01ccb417e8c34330f49e9ca1d7048b1d6b7933 /llvm/test/Other/lit-globbing.ll
parentda96c436825ca504cb4a98e78ed276b75dcdf37d (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 llvm-svn: 306832
Diffstat (limited to 'llvm/test/Other/lit-globbing.ll')
-rw-r--r--llvm/test/Other/lit-globbing.ll56
1 files changed, 28 insertions, 28 deletions
diff --git a/llvm/test/Other/lit-globbing.ll b/llvm/test/Other/lit-globbing.ll
index 5a668a90a40b..b60510ab8b22 100644
--- a/llvm/test/Other/lit-globbing.ll
+++ b/llvm/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