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
This commit is contained in:
Reid Kleckner 2015-03-02 22:42:58 +00:00
parent bb76eaa2c7
commit acbd23adf1
15 changed files with 3 additions and 35 deletions

View 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

View 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

View 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

View File

@ -13,7 +13,6 @@
// RUN: test ! -f %t.s
// RUN: test -f %t.d
// REQUIRES: shell
// REQUIRES: crash-recovery
#ifdef CRASH

View File

@ -1,4 +1,3 @@
// REQUIRES: shell
// PR15642
// RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir

View File

@ -1,4 +1,3 @@
// REQUIRES: shell
// Basic test
// RUN: rm -rf %t.dir
// RUN: mkdir -p %t.dir/a/b

View 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

View 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

View File

@ -2,7 +2,6 @@
//
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: cd %t
// ----------------------
// Build modules A and B.

View 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"

View 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

View 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

View 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}}

View File

@ -1,5 +1,3 @@
// REQUIRES: shell
//
// RUN: cd %S
// RUN: rm -rf %t
// RUN: mkdir %t

View 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