diff options
Diffstat (limited to 'clang/test/PCH')
| -rw-r--r-- | clang/test/PCH/case-insensitive-include.c | 15 | ||||
| -rw-r--r-- | clang/test/PCH/include-timestamp.cpp | 20 |
2 files changed, 19 insertions, 16 deletions
diff --git a/clang/test/PCH/case-insensitive-include.c b/clang/test/PCH/case-insensitive-include.c index 1dcda273c2f..c721225397c 100644 --- a/clang/test/PCH/case-insensitive-include.c +++ b/clang/test/PCH/case-insensitive-include.c @@ -1,18 +1,19 @@ // REQUIRES: case-insensitive-filesystem // Test this without pch. -// RUN: cp %S/Inputs/case-insensitive-include.h %T -// RUN: %clang_cc1 -Wno-nonportable-include-path -fsyntax-only %s -include %s -I %T -verify +// RUN: mkdir -p %t-dir +// RUN: cp %S/Inputs/case-insensitive-include.h %t-dir +// RUN: %clang_cc1 -Wno-nonportable-include-path -fsyntax-only %s -include %s -I %t-dir -verify // Test with pch. -// RUN: %clang_cc1 -emit-pch -o %t.pch %s -I %T +// RUN: %clang_cc1 -emit-pch -o %t.pch %s -I %t-dir // Modify inode of the header. -// RUN: cp %T/case-insensitive-include.h %t.copy -// RUN: touch -r %T/case-insensitive-include.h %t.copy -// RUN: mv %t.copy %T/case-insensitive-include.h +// RUN: cp %t-dir/case-insensitive-include.h %t.copy +// RUN: touch -r %t-dir/case-insensitive-include.h %t.copy +// RUN: mv %t.copy %t-dir/case-insensitive-include.h -// RUN: %clang_cc1 -fsyntax-only %s -include-pch %t.pch -I %T -verify +// RUN: %clang_cc1 -fsyntax-only %s -include-pch %t.pch -I %t-dir -verify // expected-no-diagnostics diff --git a/clang/test/PCH/include-timestamp.cpp b/clang/test/PCH/include-timestamp.cpp index d7d0fab13ac..36b887aee85 100644 --- a/clang/test/PCH/include-timestamp.cpp +++ b/clang/test/PCH/include-timestamp.cpp @@ -1,23 +1,25 @@ // Test that the timestamp is not included in the produced pch file with // -fno-pch-timestamp. +// RUN: mkdir -p %t-dir + // Copying files allow for read-only checkouts to run this test. -// RUN: cp %S/Inputs/pragma-once2-pch.h %T -// RUN: cp %S/Inputs/pragma-once2.h %T -// RUN: cp %s %t1.cpp +// RUN: cp %S/Inputs/pragma-once2-pch.h %t-dir +// RUN: cp %S/Inputs/pragma-once2.h %t-dir +// RUN: cp %s %t-dir/1.cpp // Check timestamp is included by default. -// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %T/pragma-once2-pch.h -// RUN: touch -m -a -t 201008011501 %T/pragma-once2.h -// RUN: not %clang_cc1 -include-pch %t %t1.cpp 2>&1 | FileCheck -check-prefix=CHECK-TIMESTAMP %s +// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %t-dir/pragma-once2-pch.h +// RUN: touch -m -a -t 201008011501 %t-dir/pragma-once2.h +// RUN: not %clang_cc1 -include-pch %t %t-dir/1.cpp 2>&1 | FileCheck -check-prefix=CHECK-TIMESTAMP %s // Check bitcode output as well. // RUN: llvm-bcanalyzer -dump %t | FileCheck -check-prefix=CHECK-BITCODE-TIMESTAMP-ON %s // Check timestamp inclusion is disabled by -fno-pch-timestamp. -// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %T/pragma-once2-pch.h -fno-pch-timestamp -// RUN: touch -m -a -t 201008011502 %T/pragma-once2.h -// RUN: %clang_cc1 -include-pch %t %t1.cpp 2>&1 +// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %t-dir/pragma-once2-pch.h -fno-pch-timestamp +// RUN: touch -m -a -t 201008011502 %t-dir/pragma-once2.h +// RUN: %clang_cc1 -include-pch %t %t-dir/1.cpp 2>&1 // Check bitcode output as well. // RUN: llvm-bcanalyzer -dump %t | FileCheck -check-prefix=CHECK-BITCODE-TIMESTAMP-OFF %s |

