[PATCH] Fix dependency-generation-crash test to actually execute clang and to clean up after itself

Greg Bedwell greg_bedwell at sn.scee.net
Tue Feb 10 06:27:03 PST 2015


Hi bogner,

I've been having an issue on my Windows box where often my build directory would not be able to be deleted from a script due to a permission denied error from a temp file created during one of the Clang tests.  Looking at the test, it appears to be badly formed, creating a temp file and then removing all permissions via chmod without actually involving clang at all.  I've attempted to fix the test to carry out what I think is its original intent and made sure it cleans up after itself on success now so fixes my original issue of not being able to delete the build folder.

Thanks,

Greg Bedwell
SN Systems - Sony Computer Entertainment Inc.

http://reviews.llvm.org/D7534

Files:
  clang/test/Frontend/dependency-generation-crash.c

Index: clang/test/Frontend/dependency-generation-crash.c
===================================================================
--- clang/test/Frontend/dependency-generation-crash.c
+++ clang/test/Frontend/dependency-generation-crash.c
@@ -1,4 +1,9 @@
 // RUN: touch %t
 // RUN: chmod 0 %t
-// %clang -E -dependency-file bla -MT %t -MP -o %t -x c /dev/null
+// RUN: not %clang_cc1 -E -dependency-file bla -MT %t -MP -o %t -x c /dev/null 2>&1 | FileCheck %s
+// RUN: rm -f %t
+
+// CHECK: error: unable to open output file
+
 // rdar://9286457
+

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7534.19672.patch
Type: text/x-patch
Size: 542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150210/94718cf9/attachment.bin>


More information about the cfe-commits mailing list