diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-03-02 22:42:58 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-03-02 22:42:58 +0000 |
commit | acbd23adf1d5e333d1ed6f9183f82e564a6de675 (patch) | |
tree | cc6b0f234aa40a1cd58bc940b41034abb956b4bb /clang/test/Modules | |
parent | bb76eaa2c73818c79773fdc8012b92846a1eebbe (diff) | |
download | bcm5719-llvm-acbd23adf1d5e333d1ed6f9183f82e564a6de675.tar.gz bcm5719-llvm-acbd23adf1d5e333d1ed6f9183f82e564a6de675.zip |
Remove shell requirements from tests that use 'cd'
Modules and Tooling tests in particular tend to want to change the cwd,
so we were missing test coverage in this area on Windows. It should now
be easier to write such portable tests.
llvm-svn: 231029
Diffstat (limited to 'clang/test/Modules')
-rw-r--r-- | clang/test/Modules/dependency-gen.modulemap | 6 | ||||
-rw-r--r-- | clang/test/Modules/explicit-build-relpath.cpp | 1 | ||||
-rw-r--r-- | clang/test/Modules/filename.cpp | 1 | ||||
-rw-r--r-- | clang/test/Modules/include-relative.c | 1 | ||||
-rw-r--r-- | clang/test/Modules/malformed.cpp | 4 | ||||
-rw-r--r-- | clang/test/Modules/modular_maps.cpp | 3 | ||||
-rw-r--r-- | clang/test/Modules/relative-dep-gen.cpp | 2 |
7 files changed, 3 insertions, 15 deletions
diff --git a/clang/test/Modules/dependency-gen.modulemap b/clang/test/Modules/dependency-gen.modulemap index 5cb8a4dba97..6aa2e007ebb 100644 --- a/clang/test/Modules/dependency-gen.modulemap +++ b/clang/test/Modules/dependency-gen.modulemap @@ -1,5 +1,3 @@ -// REQUIRES: shell -// // 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 @@ -14,5 +12,5 @@ module "test" { extern module "test-base2" "Inputs/dependency-gen-base2.modulemap" extern module "test-base" "Inputs/dependency-gen-base.modulemap" -// CHECK: {{ |\./}}Inputs/dependency-gen-included2.h -// CHECK: {{ |\./}}Inputs/dependency-gen-base.modulemap +// CHECK: {{ |\.[/\\]}}Inputs{{[/\\]}}dependency-gen-included2.h +// CHECK: {{ |\.[/\\]}}Inputs{{[/\\]}}dependency-gen-base.modulemap diff --git a/clang/test/Modules/explicit-build-relpath.cpp b/clang/test/Modules/explicit-build-relpath.cpp index d9c15660b6a..1defdb2a842 100644 --- a/clang/test/Modules/explicit-build-relpath.cpp +++ b/clang/test/Modules/explicit-build-relpath.cpp @@ -2,7 +2,6 @@ // // RUN: rm -rf %t // RUN: mkdir %t -// RUN: cd %t // ---------------------- // Build modules A and B. diff --git a/clang/test/Modules/filename.cpp b/clang/test/Modules/filename.cpp index 66891a04b74..460b6e6b957 100644 --- a/clang/test/Modules/filename.cpp +++ b/clang/test/Modules/filename.cpp @@ -1,6 +1,5 @@ // RUN: cd %S // RUN: %clang_cc1 -I. -fmodule-maps -fmodule-name=A -fmodule-map-file=%S/Inputs/filename/module.map %s -E | FileCheck %s -// REQUIRES: shell #include "Inputs/filename/a.h" diff --git a/clang/test/Modules/include-relative.c b/clang/test/Modules/include-relative.c index 9ca76eeb921..264df5f3189 100644 --- a/clang/test/Modules/include-relative.c +++ b/clang/test/Modules/include-relative.c @@ -3,7 +3,6 @@ // RUN: cp -r %S/Inputs/include-relative %t/include-relative // RUN: cd %t // RUN: %clang_cc1 -fmodules -x c -verify -fmodules-cache-path=%t -I include-relative %s -// REQUIRES: shell // expected-no-diagnostics diff --git a/clang/test/Modules/malformed.cpp b/clang/test/Modules/malformed.cpp index 2554c3a8729..2d07c4cd0da 100644 --- a/clang/test/Modules/malformed.cpp +++ b/clang/test/Modules/malformed.cpp @@ -1,8 +1,6 @@ // This test explicitly cd's to the test/Modules directory so that we can test // that filenames found via relative -I paths are printed correctly. // -// REQUIRES: shell -// // RUN: rm -rf %t // RUN: cd %S // RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I Inputs/malformed -DHEADER="a1.h" %s 2>&1 | FileCheck %s --check-prefix=CHECK-A @@ -32,6 +30,6 @@ void test() { f<int>(); } // Test that we use relative paths to name files within an imported module. // -// CHECK-C: In module 'c' imported from malformed.cpp:14: +// CHECK-C: In module 'c' imported from malformed.cpp:12: // CHECK-C: {{^}}Inputs/malformed/c.h:1:33: error: type 'int' cannot be used prior to '::' // CHECK-C: {{^}}malformed.cpp:[[@LINE-5]]:15: note: in instantiation of diff --git a/clang/test/Modules/modular_maps.cpp b/clang/test/Modules/modular_maps.cpp index 606c979c4c2..bedf2e02fb4 100644 --- a/clang/test/Modules/modular_maps.cpp +++ b/clang/test/Modules/modular_maps.cpp @@ -11,9 +11,6 @@ // RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulea-cwd.map -fmodule-map-file=Inputs/modular_maps/modulec-cwd.map -I Inputs/modular_maps %s -verify -fmodule-map-file-home-is-cwd // RxN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodule-map-file=Inputs/modular_maps/modulec-cwd.map -fmodule-map-file=Inputs/modular_maps/modulea-cwd.map -I Inputs/modular_maps %s -verify -fmodule-map-file-home-is-cwd -// chdir is unsupported on Lit internal runner. -// REQUIRES: shell - #include "common.h" #include "a.h" #include "b.h" // expected-error {{private header}} diff --git a/clang/test/Modules/relative-dep-gen.cpp b/clang/test/Modules/relative-dep-gen.cpp index c8171777154..1aa4e2a382a 100644 --- a/clang/test/Modules/relative-dep-gen.cpp +++ b/clang/test/Modules/relative-dep-gen.cpp @@ -1,5 +1,3 @@ -// REQUIRES: shell -// // RUN: cd %S // RUN: rm -rf %t // RUN: mkdir %t |