diff options
| author | Zachary Turner <zturner@google.com> | 2017-03-03 18:55:24 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-03-03 18:55:24 +0000 |
| commit | b471d4f25a403c51fa2f275d30a1e814544348d4 (patch) | |
| tree | c1d459bef1491ffff340e1b25ffbf156f10c40ef /llvm/test/Other | |
| parent | 0a4ec554c110f7914c659a0a551aeb0919930ca2 (diff) | |
| download | bcm5719-llvm-b471d4f25a403c51fa2f275d30a1e814544348d4.tar.gz bcm5719-llvm-b471d4f25a403c51fa2f275d30a1e814544348d4.zip | |
Teach lit to expand glob expressions.
This will enable removing hacks throughout the codebase
in clang and compiler-rt that feed multiple inputs to a
testing utility by globbing, all of which are either disabled
on Windows currently or using xargs / find hacks.
Differential Revision: https://reviews.llvm.org/D30380
llvm-svn: 296904
Diffstat (limited to 'llvm/test/Other')
| -rw-r--r-- | llvm/test/Other/Inputs/glob-input | 0 | ||||
| -rw-r--r-- | llvm/test/Other/lit-globbing.ll | 28 |
2 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/Other/Inputs/glob-input b/llvm/test/Other/Inputs/glob-input new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/llvm/test/Other/Inputs/glob-input diff --git a/llvm/test/Other/lit-globbing.ll b/llvm/test/Other/lit-globbing.ll new file mode 100644 index 00000000000..5a668a90a40 --- /dev/null +++ b/llvm/test/Other/lit-globbing.ll @@ -0,0 +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
|

