]> granicus.if.org Git - clang/commitdiff
Remove shell requirements from tests that use 'cd'
authorReid Kleckner <reid@kleckner.net>
Mon, 2 Mar 2015 22:42:58 +0000 (22:42 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 2 Mar 2015 22:42:58 +0000 (22:42 +0000)
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.

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

15 files changed:
test/Analysis/html-diags.c
test/Driver/debug-comp-dir.S
test/Driver/debug.c
test/Driver/output-file-cleanup.c
test/Frontend/dependency-gen-escaping.c
test/Frontend/dependency-gen.c
test/Frontend/print-header-includes.c
test/Modules/dependency-gen.modulemap
test/Modules/explicit-build-relpath.cpp
test/Modules/filename.cpp
test/Modules/include-relative.c
test/Modules/malformed.cpp
test/Modules/modular_maps.cpp
test/Modules/relative-dep-gen.cpp
test/PCH/headersearch.cpp

index 1b01783d5d24f7a057bff2acc09e0b121b2afac8..e998020f4cfa41f1088553bcb4d4ed94b653e3c7 100644 (file)
@@ -8,8 +8,6 @@
 // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o testrelative %s
 // RUN: ls %T/dir/testrelative | grep report
 
-// REQUIRES: shell
-
 // Currently this test mainly checks that the HTML diagnostics doesn't crash
 // when handling macros will calls with macros.  We should actually validate
 // the output, but that requires being able to match against a specifically
index daf895c18ac5b98c8078ac421e56b735bf4eb55b..5bf3b9295a321a349ab008f0485d6f2114c7122b 100644 (file)
@@ -1,8 +1,2 @@
 // RUN: cd %S && %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-PWD %s
 // CHECK-PWD: {{"-fdebug-compilation-dir" ".*Driver.*"}}
-
-// "PWD=/foo gcc" wouldn't necessarily work. You would need to pick a different
-// path to the same directory (try a symlink).
-
-// This depends on host's behavior how $PWD would be set.
-// REQUIRES: shell
index daf895c18ac5b98c8078ac421e56b735bf4eb55b..5bf3b9295a321a349ab008f0485d6f2114c7122b 100644 (file)
@@ -1,8 +1,2 @@
 // RUN: cd %S && %clang -### -g %s -c 2>&1 | FileCheck -check-prefix=CHECK-PWD %s
 // CHECK-PWD: {{"-fdebug-compilation-dir" ".*Driver.*"}}
-
-// "PWD=/foo gcc" wouldn't necessarily work. You would need to pick a different
-// path to the same directory (try a symlink).
-
-// This depends on host's behavior how $PWD would be set.
-// REQUIRES: shell
index 0aee5f8fa96a9a0614847e7910288d5a4109bb08..065df8f5b87bed66ab5fda49f1d0fbb01f13e95e 100644 (file)
@@ -13,7 +13,6 @@
 // RUN: test ! -f %t.s
 // RUN: test -f %t.d
 
-// REQUIRES: shell
 // REQUIRES: crash-recovery
 
 #ifdef CRASH
index 84eb242ec3c90e3515cda178ba7b16210db4332c..551df989588b686d400188e6dc30b1684ca87c74 100644 (file)
@@ -1,4 +1,3 @@
-// REQUIRES: shell
 // PR15642
 // RUN: rm -rf %t.dir
 // RUN: mkdir -p %t.dir
index 5883ec5586fffb98dc8648825b229c96316d240d..0465dc864e4214f092761411bb9d35a6e704ab2c 100644 (file)
@@ -1,4 +1,3 @@
-// REQUIRES: shell
 // Basic test
 // RUN: rm -rf %t.dir
 // RUN: mkdir -p %t.dir/a/b
index 6fde00cbbe5bf5e62750898aede81b1dccd427d2..966b4af860694931646612d237ba90446b80c9b1 100644 (file)
@@ -1,5 +1,3 @@
-// REQUIRES: shell
-
 // RUN: cd %S
 // RUN: %clang_cc1 -include Inputs/test3.h -E -H -o %t.out %s 2> %t.stderr
 // RUN: FileCheck < %t.stderr %s
index 5cb8a4dba97414e51fd918e5d6b4dc2f972533f3..6aa2e007ebb8f3b4af144a90138216ee666b8a1a 100644 (file)
@@ -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
index d9c15660b6adce6b8805278bf2e089063ec9f08b..1defdb2a842a029ee55f323707aace9c56737dc1 100644 (file)
@@ -2,7 +2,6 @@
 //
 // RUN: rm -rf %t
 // RUN: mkdir %t
-// RUN: cd %t
 
 // ----------------------
 // Build modules A and B.
index 66891a04b74495e74f6fb55f5132b7ffdd4e2138..460b6e6b95717fb03efa198cd67e607b0020ce8a 100644 (file)
@@ -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"
 
index 9ca76eeb921c88d287bf38a6c44cadac2767d647..264df5f318975ac963327a37eb2aa7303207cddf 100644 (file)
@@ -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
 
index 2554c3a8729f8b02db49c72335e19490b7ff9ab9..2d07c4cd0da78c1b65deb196e5e580f290e3ef22 100644 (file)
@@ -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
index 606c979c4c2f49dd94f98febe0a200915c40e7cd..bedf2e02fb4c66fe6c4cde62d2ec6d5b2a1875a2 100644 (file)
@@ -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}}
index c8171777154a80957dc21696713ec09b1a9eb432..1aa4e2a382a256cbc2a7c9600988e4de0855b659 100644 (file)
@@ -1,5 +1,3 @@
-// REQUIRES: shell
-//
 // RUN: cd %S
 // RUN: rm -rf %t
 // RUN: mkdir %t
index 736ba1925ad6f58e0228dd45e749259b1c40fc35..950b481b7490db5d67f2d7e3c144b92ffc7d42f4 100644 (file)
@@ -1,6 +1,5 @@
 // Test reading of PCH with changed location of original input files,
 // i.e. invoking header search.
-// REQUIRES: shell
 
 // Generate the original files:
 // RUN: rm -rf %t_orig %t_moved