]> granicus.if.org Git - clang/commitdiff
Reorganize test/Modules:
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 22 Jan 2015 23:07:47 +0000 (23:07 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 22 Jan 2015 23:07:47 +0000 (23:07 +0000)
 * Put all input files under Inputs/, move corresponding tests into test/Modules.
 * Rename a modulemap test file to [...].modulemap, and teach lit that such files are tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226875 91177308-0d34-0410-b5e6-96231b3b80d8

24 files changed:
test/Modules/Inputs/macro-reexport/a1.h [moved from test/Modules/macro-reexport/a1.h with 100% similarity]
test/Modules/Inputs/macro-reexport/a2.h [moved from test/Modules/macro-reexport/a2.h with 100% similarity]
test/Modules/Inputs/macro-reexport/b1.h [moved from test/Modules/macro-reexport/b1.h with 100% similarity]
test/Modules/Inputs/macro-reexport/b2.h [moved from test/Modules/macro-reexport/b2.h with 100% similarity]
test/Modules/Inputs/macro-reexport/c1.h [moved from test/Modules/macro-reexport/c1.h with 100% similarity]
test/Modules/Inputs/macro-reexport/d1.h [moved from test/Modules/macro-reexport/d1.h with 100% similarity]
test/Modules/Inputs/macro-reexport/d2.h [moved from test/Modules/macro-reexport/d2.h with 100% similarity]
test/Modules/Inputs/macro-reexport/e1.h [moved from test/Modules/macro-reexport/e1.h with 100% similarity]
test/Modules/Inputs/macro-reexport/e2.h [moved from test/Modules/macro-reexport/e2.h with 100% similarity]
test/Modules/Inputs/macro-reexport/f1.h [moved from test/Modules/macro-reexport/f1.h with 100% similarity]
test/Modules/Inputs/macro-reexport/module.modulemap [moved from test/Modules/macro-reexport/module.modulemap with 100% similarity]
test/Modules/Inputs/redecls/a.h [moved from test/Modules/redecls/a.h with 100% similarity]
test/Modules/Inputs/redecls/b.h [moved from test/Modules/redecls/b.h with 100% similarity]
test/Modules/Inputs/redecls/module.map [moved from test/Modules/redecls/module.map with 100% similarity]
test/Modules/Inputs/self-import-header/af.framework/Headers/a1.h [moved from test/Modules/self-import-header/af.framework/Headers/a1.h with 100% similarity]
test/Modules/Inputs/self-import-header/af.framework/Headers/a2.h [moved from test/Modules/self-import-header/af.framework/Headers/a2.h with 100% similarity]
test/Modules/Inputs/self-import-header/af.framework/module.map [moved from test/Modules/self-import-header/af.framework/module.map with 100% similarity]
test/Modules/Inputs/self-import-header/depend_builtin/h1.h [moved from test/Modules/self-import-header/depend_builtin/h1.h with 100% similarity]
test/Modules/Inputs/self-import-header/depend_builtin/module.map [moved from test/Modules/self-import-header/depend_builtin/module.map with 100% similarity]
test/Modules/dependency-gen.modulemap [moved from test/Modules/dependency-gen.modulemap.cpp with 84% similarity]
test/Modules/macro-reexport.cpp [moved from test/Modules/macro-reexport/macro-reexport.cpp with 50% similarity]
test/Modules/redecls.m [moved from test/Modules/redecls/main.m with 56% similarity]
test/Modules/self-import-header.m [moved from test/Modules/self-import-header/test.m with 64% similarity]
test/lit.cfg

similarity index 84%
rename from test/Modules/dependency-gen.modulemap.cpp
rename to test/Modules/dependency-gen.modulemap
index c49714c14ed94edc3efa9667032f5bc21b1855f4..5cb8a4dba97414e51fd918e5d6b4dc2f972533f3 100644 (file)
@@ -3,7 +3,7 @@
 // RUN: cd %S
 // RUN: rm -f %t.cpm %t-base.pcm %t-base.d %t.d
 // RUN: %clang_cc1 -I. -x c++ -fmodule-maps -fmodule-name=test-base -fno-modules-implicit-maps -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse Inputs/dependency-gen-base.modulemap -dependency-file %t-base.d -MT %t-base.pcm -o %t-base.pcm -fmodule-map-file-home-is-cwd
-// RUN: %clang_cc1 -I. -x c++ -fmodule-maps -fmodule-name=test -fno-modules-implicit-maps -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse -fmodule-file=%t-base.pcm dependency-gen.modulemap.cpp -dependency-file %t.d -MT %t.pcm -o %t.pcm -fmodule-map-file-home-is-cwd
+// RUN: %clang_cc1 -I. -x c++ -fmodule-maps -fmodule-name=test -fno-modules-implicit-maps -fmodules -emit-module -fno-validate-pch -fmodules-strict-decluse -fmodule-file=%t-base.pcm %s -dependency-file %t.d -MT %t.pcm -o %t.pcm -fmodule-map-file-home-is-cwd
 // RUN: FileCheck %s < %t.d
 module "test" {
   export *
similarity index 50%
rename from test/Modules/macro-reexport/macro-reexport.cpp
rename to test/Modules/macro-reexport.cpp
index af2ec847ce078787fd6cb984f3018dc167bffa17..1df49b948d3698c093d730530ba87c5c18498045 100644 (file)
@@ -1,12 +1,12 @@
 // RUN: rm -rf %t
-// RUN: %clang_cc1 -fsyntax-only -DC1 -I. %s -fmodules-cache-path=%t -verify
-// RUN: %clang_cc1 -fsyntax-only -DC1 -I. -fmodules %s -fmodules-cache-path=%t -verify
-// RUN: %clang_cc1 -fsyntax-only -DD1 -I. %s -fmodules-cache-path=%t -verify
-// RUN: %clang_cc1 -fsyntax-only -DD1 -I. -fmodules %s -fmodules-cache-path=%t -verify
-// RUN: %clang_cc1 -fsyntax-only -DD2 -I. %s -fmodules-cache-path=%t -verify
-// RUN: %clang_cc1 -fsyntax-only -DD2 -I. -fmodules %s -fmodules-cache-path=%t -verify
-// RUN: %clang_cc1 -fsyntax-only -DF1 -I. %s -fmodules-cache-path=%t -verify
-// RUN: %clang_cc1 -fsyntax-only -DF1 -I. -fmodules %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DC1 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DC1 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DD1 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DD1 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DD2 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DD2 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DF1 -I%S/Inputs/macro-reexport %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DF1 -I%S/Inputs/macro-reexport -fmodules %s -fmodules-cache-path=%t -verify
 
 #if defined(F1)
 #include "f1.h"
similarity index 56%
rename from test/Modules/redecls/main.m
rename to test/Modules/redecls.m
index bf3788a96d80e6d35dd73fe86ab642a00eea7473..fa643b90ac8aad8f9e858143400286e4a074cd66 100644 (file)
@@ -1,9 +1,7 @@
 // RUN: rm -rf %t.mcp
-// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodule-name=a %S/module.map -fmodules-cache-path=%t.mcp
-// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodule-name=b %S/module.map -fmodules-cache-path=%t.mcp
-// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t1.pch -fmodules-cache-path=%t.mcp -I %S
-// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t2.pch -include-pch %t1.pch -fmodules-cache-path=%t.mcp -I %S
-// RUN: %clang_cc1 -fmodules %s -fsyntax-only -include-pch %t2.pch -I %S -fmodules-cache-path=%t.mcp -verify
+// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t1.pch -fmodules-cache-path=%t.mcp -I %S/Inputs/redecls
+// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t2.pch -include-pch %t1.pch -fmodules-cache-path=%t.mcp -I %S/Inputs/redecls
+// RUN: %clang_cc1 -fmodules %s -fsyntax-only -include-pch %t2.pch -I %S/Inputs/redecls -fmodules-cache-path=%t.mcp -verify
 
 #ifndef HEADER1
 #define HEADER1
similarity index 64%
rename from test/Modules/self-import-header/test.m
rename to test/Modules/self-import-header.m
index 377c01d66eb32b87a24258225bab020ac6def9ff..4acc310fdec1515d14763a05c9dde82cf5519760 100644 (file)
@@ -3,6 +3,6 @@
 // RUN: rm -rf %t
 // RUN: %clang -fsyntax-only -isysroot %S/../Inputs/System/usr/include -fmodules -fmodules-cache-path=%t \
 // RUN:    -target x86_64-darwin \
-// RUN:    -F %S -I %S %s -D__need_wint_t -Werror=implicit-function-declaration
+// RUN:    -F %S -I %S/Inputs/self-import-header %s -D__need_wint_t -Werror=implicit-function-declaration
 
 @import af;
index b7e64b6a28425f2228230366ef7495347684ae81..0d6fb91b3b0c6a721cc2cc3f9943fe4225a3fc1f 100644 (file)
@@ -44,7 +44,7 @@ else:
 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', '.S']
+config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s', '.S', '.modulemap']
 
 # excludes: A list of directories to exclude from the testsuite. The 'Inputs'
 # subdirectories contain auxiliary inputs for various tests in their parent