1 | // RUN: rm -f "%t.d" "%t1.s" "%t2.s" "%t3.s" "%t4.s" "%t5.s" |
2 | // |
3 | // RUN: touch %t.s |
4 | // RUN: not %clang -S -DCRASH -o %t.s -MMD -MF %t.d %s |
5 | // RUN: test ! -f %t.s |
6 | // RUN: test ! -f %t.d |
7 | |
8 | // RUN: touch %t.s |
9 | // RUN: not %clang -S -DMISSING -o %t.s -MMD -MF %t.d %s |
10 | // RUN: test ! -f %t.s |
11 | // RUN: test ! -f %t.d |
12 | |
13 | // RUN: touch %t.s |
14 | // RUN: not %clang -S -o %t.s -MMD -MF %t.d %s |
15 | // RUN: test ! -f %t.s |
16 | // RUN: test -f %t.d |
17 | |
18 | // REQUIRES: crash-recovery |
19 | |
20 | #ifdef CRASH |
21 | #pragma clang __debug crash |
22 | #elif defined(MISSING) |
23 | #include "nonexistent.h" |
24 | #else |
25 | invalid C code |
26 | #endif |
27 | |
28 | // RUN: rm -rf %t-dir |
29 | // RUN: mkdir -p %t-dir |
30 | // RUN: cd %t-dir |
31 | |
32 | // RUN: touch %t-dir/1.c |
33 | // RUN: echo "invalid C code" > %t-dir/2.c |
34 | // RUN: not %clang -S %t-dir/1.c %t-dir/2.c |
35 | // RUN: test -f %t-dir/1.s |
36 | // RUN: test ! -f %t-dir/2.s |
37 | |
38 | // RUN: touch %t-dir/1.c |
39 | // RUN: touch %t-dir/2.c |
40 | // RUN: chmod -r %t-dir/2.c |
41 | // RUN: not %clang -S %t-dir/1.c %t-dir/2.c |
42 | // RUN: test -f %t-dir/1.s |
43 | // RUN: test ! -f %t-dir/2.s |
44 | // RUN: rm -f %t-dir/2.c |
45 | |