Re: [PATCH] D22310: Make the test for fno-pch-timestamp compatible with read-only checkouts.

2016-07-14 Thread pierre gousseau via cfe-commits
pgousseau closed this revision.
pgousseau added a comment.

Committed in https://reviews.llvm.org/rL275415


https://reviews.llvm.org/D22310



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D22310: Make the test for fno-pch-timestamp compatible with read-only checkouts.

2016-07-14 Thread pierre gousseau via cfe-commits
pgousseau added a comment.

In https://reviews.llvm.org/D22310#484017, @bkramer wrote:

> lg


Thanks for the review!


https://reviews.llvm.org/D22310



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


Re: [PATCH] D22310: Make the test for fno-pch-timestamp compatible with read-only checkouts.

2016-07-14 Thread Benjamin Kramer via cfe-commits
bkramer added a subscriber: bkramer.
bkramer accepted this revision.
bkramer added a reviewer: bkramer.
bkramer added a comment.
This revision is now accepted and ready to land.

lg


https://reviews.llvm.org/D22310



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D22310: Make the test for fno-pch-timestamp compatible with read-only checkouts.

2016-07-13 Thread pierre gousseau via cfe-commits
pgousseau created this revision.
pgousseau added a reviewer: rsmith.
pgousseau added subscribers: cfe-commits, trybka, bruno, gbedwell, wristow, 
probinson.

The test added in r275267 does not work on read-only checkouts because of the 
use of touch -t.
Following Tom Rybka suggestion, the test files are now copied to a temporary 
directory first.

http://reviews.llvm.org/D22310

Files:
  test/PCH/include-timestamp.cpp

Index: test/PCH/include-timestamp.cpp
===
--- test/PCH/include-timestamp.cpp
+++ test/PCH/include-timestamp.cpp
@@ -1,23 +1,28 @@
 // Test that the timestamp is not included in the produced pch file with
 // -fno-pch-timestamp.
 
+// 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
+
 // Check timestamp is included by default.
-// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/Inputs/pragma-once2-pch.h
-// RUN: touch -m -a -t 201008011501 %S/Inputs/pragma-once2.h
-// RUN: not %clang_cc1 -include-pch %t %s 2>&1 | FileCheck 
-check-prefix=CHECK-TIMESTAMP %s
+// 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
 
 // 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 %S/Inputs/pragma-once2-pch.h 
-fno-pch-timestamp
-// RUN: touch -m -a -t 201008011502 %S/Inputs/pragma-once2.h
-// RUN: %clang_cc1 -include-pch %t %s 2>&1
+// 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
 
 // Check bitcode output as well.
 // RUN: llvm-bcanalyzer -dump %t | FileCheck 
-check-prefix=CHECK-BITCODE-TIMESTAMP-OFF %s
 
-#include "Inputs/pragma-once2.h"
+#include "pragma-once2.h"
 
 void g() { f(); }
 


Index: test/PCH/include-timestamp.cpp
===
--- test/PCH/include-timestamp.cpp
+++ test/PCH/include-timestamp.cpp
@@ -1,23 +1,28 @@
 // Test that the timestamp is not included in the produced pch file with
 // -fno-pch-timestamp.
 
+// 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
+
 // Check timestamp is included by default.
-// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/Inputs/pragma-once2-pch.h
-// RUN: touch -m -a -t 201008011501 %S/Inputs/pragma-once2.h
-// RUN: not %clang_cc1 -include-pch %t %s 2>&1 | FileCheck -check-prefix=CHECK-TIMESTAMP %s
+// 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
 
 // 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 %S/Inputs/pragma-once2-pch.h -fno-pch-timestamp
-// RUN: touch -m -a -t 201008011502 %S/Inputs/pragma-once2.h
-// RUN: %clang_cc1 -include-pch %t %s 2>&1
+// 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
 
 // Check bitcode output as well.
 // RUN: llvm-bcanalyzer -dump %t | FileCheck -check-prefix=CHECK-BITCODE-TIMESTAMP-OFF %s
 
-#include "Inputs/pragma-once2.h"
+#include "pragma-once2.h"
 
 void g() { f(); }
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits