[clang-tools-extra] r189047 - clang-replace: Layout of test directory now more standard

Edwin Vane edwin.vane at intel.com
Thu Aug 22 12:44:08 PDT 2013


Author: revane
Date: Thu Aug 22 14:44:07 2013
New Revision: 189047

URL: http://llvm.org/viewvc/llvm-project?rev=189047&view=rev
Log:
clang-replace: Layout of test directory now more standard

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.


Added:
    clang-tools-extra/trunk/test/clang-replace/Inputs/
    clang-tools-extra/trunk/test/clang-replace/Inputs/basic/
      - copied from r189046, clang-tools-extra/trunk/test/clang-replace/basic/
    clang-tools-extra/trunk/test/clang-replace/Inputs/conflict/
      - copied from r189046, clang-tools-extra/trunk/test/clang-replace/conflict/
Removed:
    clang-tools-extra/trunk/test/clang-replace/basic/
    clang-tools-extra/trunk/test/clang-replace/conflict/
    clang-tools-extra/trunk/test/clang-replace/lit.local.cfg
Modified:
    clang-tools-extra/trunk/test/clang-replace/basic.cpp
    clang-tools-extra/trunk/test/clang-replace/conflict.cpp
    clang-tools-extra/trunk/test/lit.cfg

Modified: clang-tools-extra/trunk/test/clang-replace/basic.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-replace/basic.cpp?rev=189047&r1=189046&r2=189047&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-replace/basic.cpp (original)
+++ clang-tools-extra/trunk/test/clang-replace/basic.cpp Thu Aug 22 14:44:07 2013
@@ -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

Modified: clang-tools-extra/trunk/test/clang-replace/conflict.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-replace/conflict.cpp?rev=189047&r1=189046&r2=189047&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-replace/conflict.cpp (original)
+++ clang-tools-extra/trunk/test/clang-replace/conflict.cpp Thu Aug 22 14:44:07 2013
@@ -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

Removed: clang-tools-extra/trunk/test/clang-replace/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-replace/lit.local.cfg?rev=189046&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/clang-replace/lit.local.cfg (original)
+++ clang-tools-extra/trunk/test/clang-replace/lit.local.cfg (removed)
@@ -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']

Modified: clang-tools-extra/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/lit.cfg?rev=189047&r1=189046&r2=189047&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/lit.cfg (original)
+++ clang-tools-extra/trunk/test/lit.cfg Thu Aug 22 14:44:07 2013
@@ -36,6 +36,10 @@ config.test_format = lit.formats.ShTest(
 # 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__)
 





More information about the cfe-commits mailing list