clang-replace: Layout of test directory now more standard
authorEdwin Vane <edwin.vane@intel.com>
Thu, 22 Aug 2013 19:44:07 +0000 (19:44 +0000)
committerEdwin Vane <edwin.vane@intel.com>
Thu, 22 Aug 2013 19:44:07 +0000 (19:44 +0000)
Test-time dependencies now live within test/clang-replace/Inputs which is more
in line with llvm and clang test suites.

Added 'Inputs' to the lit config's 'exclude' list as with llvm's lit.cfg since
test-time dependencies should not have any lit scripts within.

llvm-svn: 189047

12 files changed:
clang-tools-extra/test/clang-replace/Inputs/basic/basic.h [moved from clang-tools-extra/test/clang-replace/basic/basic.h with 100% similarity]
clang-tools-extra/test/clang-replace/Inputs/basic/file1.yaml [moved from clang-tools-extra/test/clang-replace/basic/file1.yaml with 100% similarity]
clang-tools-extra/test/clang-replace/Inputs/basic/file2.yaml [moved from clang-tools-extra/test/clang-replace/basic/file2.yaml with 100% similarity]
clang-tools-extra/test/clang-replace/Inputs/conflict/common.h [moved from clang-tools-extra/test/clang-replace/conflict/common.h with 100% similarity]
clang-tools-extra/test/clang-replace/Inputs/conflict/expected.txt [moved from clang-tools-extra/test/clang-replace/conflict/expected.txt with 100% similarity]
clang-tools-extra/test/clang-replace/Inputs/conflict/file1.yaml [moved from clang-tools-extra/test/clang-replace/conflict/file1.yaml with 100% similarity]
clang-tools-extra/test/clang-replace/Inputs/conflict/file2.yaml [moved from clang-tools-extra/test/clang-replace/conflict/file2.yaml with 100% similarity]
clang-tools-extra/test/clang-replace/Inputs/conflict/file3.yaml [moved from clang-tools-extra/test/clang-replace/conflict/file3.yaml with 100% similarity]
clang-tools-extra/test/clang-replace/basic.cpp
clang-tools-extra/test/clang-replace/conflict.cpp
clang-tools-extra/test/clang-replace/lit.local.cfg [deleted file]
clang-tools-extra/test/lit.cfg

index 15aa681..549c4f9 100644 (file)
@@ -1,6 +1,6 @@
-// RUN: mkdir -p %T/basic
-// RUN: grep -Ev "// *[A-Z-]+:" %S/basic/basic.h > %T/basic/basic.h
-// RUN: sed "s#\$(path)#%/T/basic#" %S/basic/file1.yaml > %T/basic/file1.yaml
-// RUN: sed "s#\$(path)#%/T/basic#" %S/basic/file2.yaml > %T/basic/file2.yaml
-// RUN: clang-replace %T/basic
-// RUN: FileCheck -input-file=%T/basic/basic.h %S/basic/basic.h
+// RUN: mkdir -p %T/Inputs/basic
+// RUN: grep -Ev "// *[A-Z-]+:" %S/Inputs/basic/basic.h > %T/Inputs/basic/basic.h
+// RUN: sed "s#\$(path)#%/T/Inputs/basic#" %S/Inputs/basic/file1.yaml > %T/Inputs/basic/file1.yaml
+// RUN: sed "s#\$(path)#%/T/Inputs/basic#" %S/Inputs/basic/file2.yaml > %T/Inputs/basic/file2.yaml
+// RUN: clang-replace %T/Inputs/basic
+// RUN: FileCheck -input-file=%T/Inputs/basic/basic.h %S/Inputs/basic/basic.h
index 5b79401..2311205 100644 (file)
@@ -1,7 +1,7 @@
-// RUN: mkdir -p %T/conflict
-// RUN: sed "s#\$(path)#%/S/conflict#" %S/conflict/file1.yaml > %T/conflict/file1.yaml
-// RUN: sed "s#\$(path)#%/S/conflict#" %S/conflict/file2.yaml > %T/conflict/file2.yaml
-// RUN: sed "s#\$(path)#%/S/conflict#" %S/conflict/file3.yaml > %T/conflict/file3.yaml
-// RUN: sed "s#\$(path)#%/S/conflict#" %S/conflict/expected.txt > %T/conflict/expected.txt
-// RUN: not clang-replace %T/conflict > %T/conflict/output.txt 2>&1
-// RUN: diff -b %T/conflict/output.txt %T/conflict/expected.txt
+// RUN: mkdir -p %T/Inputs/conflict
+// RUN: sed "s#\$(path)#%/S/Inputs/conflict#" %S/Inputs/conflict/file1.yaml > %T/Inputs/conflict/file1.yaml
+// RUN: sed "s#\$(path)#%/S/Inputs/conflict#" %S/Inputs/conflict/file2.yaml > %T/Inputs/conflict/file2.yaml
+// RUN: sed "s#\$(path)#%/S/Inputs/conflict#" %S/Inputs/conflict/file3.yaml > %T/Inputs/conflict/file3.yaml
+// RUN: sed "s#\$(path)#%/S/Inputs/conflict#" %S/Inputs/conflict/expected.txt > %T/Inputs/conflict/expected.txt
+// RUN: not clang-replace %T/Inputs/conflict > %T/Inputs/conflict/output.txt 2>&1
+// RUN: diff -b %T/Inputs/conflict/output.txt %T/Inputs/conflict/expected.txt
diff --git a/clang-tools-extra/test/clang-replace/lit.local.cfg b/clang-tools-extra/test/clang-replace/lit.local.cfg
deleted file mode 100644 (file)
index 367c870..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-# These subdirectories contain test-time dependencies and don't contain actual
-# tests. Tell LIT to ignore them.
-config.excludes = ['basic', 'conflict']
index b4c8fff..6d33320 100644 (file)
@@ -36,6 +36,10 @@ config.test_format = lit.formats.ShTest(execute_external)
 # suffixes: A list of file extensions to treat as test files.
 config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s', '.modularize']
 
+# Test-time dependencies located in directories called 'Inputs' are excluded
+# from test suites; there won't be any lit tests within them.
+config.excludes = ['Inputs']
+
 # test_source_root: The root path where tests are located.
 config.test_source_root = os.path.dirname(__file__)