This is awesome, thanks! On 2 March 2015 at 14:42, Reid Kleckner <[email protected]> wrote: > Author: rnk > Date: Mon Mar 2 16:42:58 2015 > New Revision: 231029 > > URL: http://llvm.org/viewvc/llvm-project?rev=231029&view=rev > Log: > 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. > > Modified: > cfe/trunk/test/Analysis/html-diags.c > cfe/trunk/test/Driver/debug-comp-dir.S > cfe/trunk/test/Driver/debug.c > cfe/trunk/test/Driver/output-file-cleanup.c > cfe/trunk/test/Frontend/dependency-gen-escaping.c > cfe/trunk/test/Frontend/dependency-gen.c > cfe/trunk/test/Frontend/print-header-includes.c > cfe/trunk/test/Modules/dependency-gen.modulemap > cfe/trunk/test/Modules/explicit-build-relpath.cpp > cfe/trunk/test/Modules/filename.cpp > cfe/trunk/test/Modules/include-relative.c > cfe/trunk/test/Modules/malformed.cpp > cfe/trunk/test/Modules/modular_maps.cpp > cfe/trunk/test/Modules/relative-dep-gen.cpp > cfe/trunk/test/PCH/headersearch.cpp > > Modified: cfe/trunk/test/Analysis/html-diags.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/html-diags.c?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Analysis/html-diags.c (original) > +++ cfe/trunk/test/Analysis/html-diags.c Mon Mar 2 16:42:58 2015 > @@ -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 > > Modified: cfe/trunk/test/Driver/debug-comp-dir.S > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-comp-dir.S?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Driver/debug-comp-dir.S (original) > +++ cfe/trunk/test/Driver/debug-comp-dir.S Mon Mar 2 16:42:58 2015 > @@ -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 > > Modified: cfe/trunk/test/Driver/debug.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug.c?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Driver/debug.c (original) > +++ cfe/trunk/test/Driver/debug.c Mon Mar 2 16:42:58 2015 > @@ -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 > > Modified: cfe/trunk/test/Driver/output-file-cleanup.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/output-file-cleanup.c?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Driver/output-file-cleanup.c (original) > +++ cfe/trunk/test/Driver/output-file-cleanup.c Mon Mar 2 16:42:58 2015 > @@ -13,7 +13,6 @@ > // RUN: test ! -f %t.s > // RUN: test -f %t.d > > -// REQUIRES: shell > // REQUIRES: crash-recovery > > #ifdef CRASH > > Modified: cfe/trunk/test/Frontend/dependency-gen-escaping.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/dependency-gen-escaping.c?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Frontend/dependency-gen-escaping.c (original) > +++ cfe/trunk/test/Frontend/dependency-gen-escaping.c Mon Mar 2 16:42:58 2015 > @@ -1,4 +1,3 @@ > -// REQUIRES: shell > // PR15642 > // RUN: rm -rf %t.dir > // RUN: mkdir -p %t.dir > > Modified: cfe/trunk/test/Frontend/dependency-gen.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/dependency-gen.c?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Frontend/dependency-gen.c (original) > +++ cfe/trunk/test/Frontend/dependency-gen.c Mon Mar 2 16:42:58 2015 > @@ -1,4 +1,3 @@ > -// REQUIRES: shell > // Basic test > // RUN: rm -rf %t.dir > // RUN: mkdir -p %t.dir/a/b > > Modified: cfe/trunk/test/Frontend/print-header-includes.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/print-header-includes.c?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Frontend/print-header-includes.c (original) > +++ cfe/trunk/test/Frontend/print-header-includes.c Mon Mar 2 16:42:58 2015 > @@ -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 > > Modified: cfe/trunk/test/Modules/dependency-gen.modulemap > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/dependency-gen.modulemap?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Modules/dependency-gen.modulemap (original) > +++ cfe/trunk/test/Modules/dependency-gen.modulemap Mon Mar 2 16:42:58 2015 > @@ -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 > > Modified: cfe/trunk/test/Modules/explicit-build-relpath.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/explicit-build-relpath.cpp?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Modules/explicit-build-relpath.cpp (original) > +++ cfe/trunk/test/Modules/explicit-build-relpath.cpp Mon Mar 2 16:42:58 2015 > @@ -2,7 +2,6 @@ > // > // RUN: rm -rf %t > // RUN: mkdir %t > -// RUN: cd %t > > // ---------------------- > // Build modules A and B. > > Modified: cfe/trunk/test/Modules/filename.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/filename.cpp?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Modules/filename.cpp (original) > +++ cfe/trunk/test/Modules/filename.cpp Mon Mar 2 16:42:58 2015 > @@ -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" > > > Modified: cfe/trunk/test/Modules/include-relative.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/include-relative.c?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Modules/include-relative.c (original) > +++ cfe/trunk/test/Modules/include-relative.c Mon Mar 2 16:42:58 2015 > @@ -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 > > > Modified: cfe/trunk/test/Modules/malformed.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/malformed.cpp?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Modules/malformed.cpp (original) > +++ cfe/trunk/test/Modules/malformed.cpp Mon Mar 2 16:42:58 2015 > @@ -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 > > Modified: cfe/trunk/test/Modules/modular_maps.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/modular_maps.cpp?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Modules/modular_maps.cpp (original) > +++ cfe/trunk/test/Modules/modular_maps.cpp Mon Mar 2 16:42:58 2015 > @@ -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}} > > Modified: cfe/trunk/test/Modules/relative-dep-gen.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/relative-dep-gen.cpp?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/Modules/relative-dep-gen.cpp (original) > +++ cfe/trunk/test/Modules/relative-dep-gen.cpp Mon Mar 2 16:42:58 2015 > @@ -1,5 +1,3 @@ > -// REQUIRES: shell > -// > // RUN: cd %S > // RUN: rm -rf %t > // RUN: mkdir %t > > Modified: cfe/trunk/test/PCH/headersearch.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/headersearch.cpp?rev=231029&r1=231028&r2=231029&view=diff > ============================================================================== > --- cfe/trunk/test/PCH/headersearch.cpp (original) > +++ cfe/trunk/test/PCH/headersearch.cpp Mon Mar 2 16:42:58 2015 > @@ -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 > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
