summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-01-24 19:14:47 +0000
committerChad Rosier <mcrosier@apple.com>2013-01-24 19:14:47 +0000
commit633dcdc52d0832cd756db350103d457e5448ddf8 (patch)
tree77a9d4f671cc1a4841705ed52f296489ad13e950 /clang/test
parent5f8609b7b41d37daba4eff659eb490b7bda685b8 (diff)
downloadbcm5719-llvm-633dcdc52d0832cd756db350103d457e5448ddf8.tar.gz
bcm5719-llvm-633dcdc52d0832cd756db350103d457e5448ddf8.zip
[driver] Associate a JobAction with each result file. This enables the driver
to delete result files for only those commands that fail. Part of rdar://12984531 llvm-svn: 173361
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Driver/output-file-cleanup.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/clang/test/Driver/output-file-cleanup.c b/clang/test/Driver/output-file-cleanup.c
index 0a0c96001b5..19c0badfdbe 100644
--- a/clang/test/Driver/output-file-cleanup.c
+++ b/clang/test/Driver/output-file-cleanup.c
@@ -1,15 +1,15 @@
// RUN: touch %t.o
-// RUN: not %clang -DCRASH -o %t.o -MMD -MF %t.d %s
+// RUN: not %clang -c -DCRASH -o %t.o -MMD -MF %t.d %s
// RUN: test ! -f %t.o
// RUN: test ! -f %t.d
// RUN: touch %t.o
-// RUN: not %clang -DMISSING -o %t.o -MMD -MF %t.d %s
+// RUN: not %clang -c -DMISSING -o %t.o -MMD -MF %t.d %s
// RUN: test ! -f %t.o
// RUN: test ! -f %t.d
// RUN: touch %t.o
-// RUN: not %clang -o %t.o -MMD -MF %t.d %s
+// RUN: not %clang -c -o %t.o -MMD -MF %t.d %s
// RUN: test ! -f %t.o
// RUN: test -f %t.d
@@ -23,3 +23,16 @@
#else
invalid C code
#endif
+
+// RUN: touch %t1.c
+// RUN: echo "invalid C code" > %t2.c
+// RUN: cd %T && not %clang -c %t1.c %t2.c
+// RUN: test -f %t1.o
+// RUN: test ! -f %t2.o
+
+// RUN: touch %t1.c
+// RUN: touch %t2.c
+// RUN: chmod -r %t2.c
+// RUN: cd %T && not %clang -c %t1.c %t2.c
+// RUN: test -f %t1.o
+// RUN: test ! -f %t2.o
OpenPOWER on IntegriCloud