summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-03-02 22:42:58 +0000
committerReid Kleckner <reid@kleckner.net>2015-03-02 22:42:58 +0000
commitacbd23adf1d5e333d1ed6f9183f82e564a6de675 (patch)
treecc6b0f234aa40a1cd58bc940b41034abb956b4bb
parentbb76eaa2c73818c79773fdc8012b92846a1eebbe (diff)
downloadbcm5719-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
-rw-r--r--clang/test/Analysis/html-diags.c2
-rw-r--r--clang/test/Driver/debug-comp-dir.S6
-rw-r--r--clang/test/Driver/debug.c6
-rw-r--r--clang/test/Driver/output-file-cleanup.c1
-rw-r--r--clang/test/Frontend/dependency-gen-escaping.c1
-rw-r--r--clang/test/Frontend/dependency-gen.c1
-rw-r--r--clang/test/Frontend/print-header-includes.c2
-rw-r--r--clang/test/Modules/dependency-gen.modulemap6
-rw-r--r--clang/test/Modules/explicit-build-relpath.cpp1
-rw-r--r--clang/test/Modules/filename.cpp1
-rw-r--r--clang/test/Modules/include-relative.c1
-rw-r--r--clang/test/Modules/malformed.cpp4
-rw-r--r--clang/test/Modules/modular_maps.cpp3
-rw-r--r--clang/test/Modules/relative-dep-gen.cpp2
-rw-r--r--clang/test/PCH/headersearch.cpp1
15 files changed, 3 insertions, 35 deletions
diff --git a/clang/test/Analysis/html-diags.c b/clang/test/Analysis/html-diags.c
index 1b01783d5d2..e998020f4cf 100644
--- a/clang/test/Analysis/html-diags.c
+++ b/clang/test/Analysis/html-diags.c
@@ -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
diff --git a/clang/test/Driver/debug-comp-dir.S b/clang/test/Driver/debug-comp-dir.S
index daf895c18ac..5bf3b9295a3 100644
--- a/clang/test/Driver/debug-comp-dir.S
+++ b/clang/test/Driver/debug-comp-dir.S
@@ -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
diff --git a/clang/test/Driver/debug.c b/clang/test/Driver/debug.c
index daf895c18ac..5bf3b9295a3 100644
--- a/clang/test/Driver/debug.c
+++ b/clang/test/Driver/debug.c
@@ -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
diff --git a/clang/test/Driver/output-file-cleanup.c b/clang/test/Driver/output-file-cleanup.c
index 0aee5f8fa96..065df8f5b87 100644
--- a/clang/test/Driver/output-file-cleanup.c
+++ b/clang/test/Driver/output-file-cleanup.c
@@ -13,7 +13,6 @@
// RUN: test ! -f %t.s
// RUN: test -f %t.d
-// REQUIRES: shell
// REQUIRES: crash-recovery
#ifdef CRASH
diff --git a/clang/test/Frontend/dependency-gen-escaping.c b/clang/test/Frontend/dependency-gen-escaping.c
index 84eb242ec3c..551df989588 100644
--- a/clang/test/Frontend/dependency-gen-escaping.c
+++ b/clang/test/Frontend/dependency-gen-escaping.c
@@ -1,4 +1,3 @@
-// REQUIRES: shell
// PR15642
// RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir
diff --git a/clang/test/Frontend/dependency-gen.c b/clang/test/Frontend/dependency-gen.c
index 5883ec5586f..0465dc864e4 100644
--- a/clang/test/Frontend/dependency-gen.c
+++ b/clang/test/Frontend/dependency-gen.c
@@ -1,4 +1,3 @@
-// REQUIRES: shell
// Basic test
// RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir/a/b
diff --git a/clang/test/Frontend/print-header-includes.c b/clang/test/Frontend/print-header-includes.c
index 6fde00cbbe5..966b4af8606 100644
--- a/clang/test/Frontend/print-header-includes.c
+++ b/clang/test/Frontend/print-header-includes.c
@@ -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
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
diff --git a/clang/test/PCH/headersearch.cpp b/clang/test/PCH/headersearch.cpp
index 736ba1925ad..950b481b749 100644
--- a/clang/test/PCH/headersearch.cpp
+++ b/clang/test/PCH/headersearch.cpp
@@ -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
OpenPOWER on IntegriCloud