2 // RUN: split-file %s %t
4 //--- missing_tu.json.in
7 "command": "clang -fsyntax-only DIR/missing_tu.c",
8 "file": "DIR/missing_tu.c"
10 //--- missing_header.json.in
13 "command": "clang -fsyntax-only DIR/missing_header.c",
14 "file": "DIR/missing_header.c"
16 //--- missing_header.c
19 // RUN: sed -e "s|DIR|%/t|g" %t/missing_tu.json.in > %t/missing_tu.json
20 // RUN: not clang-scan-deps -compilation-database %t/missing_tu.json 2>%t/missing_tu.errs
21 // RUN: echo EOF >> %t/missing_tu.errs
22 // RUN: cat %t/missing_tu.errs | sed 's:\\\\\?:/:g' | FileCheck %s --check-prefix=CHECK-MISSING-TU -DPREFIX=%/t
23 // CHECK-MISSING-TU: Error while scanning dependencies for [[PREFIX]]/missing_tu.c
24 // CHECK-MISSING-TU-NEXT: error: no such file or directory: '[[PREFIX]]/missing_tu.c'
25 // CHECK-MISSING-TU-NEXT: error: no input files
26 // CHECK-MISSING-TU-NEXT: error:
27 // CHECK-MISSING-TU-NEXT: EOF
29 // RUN: sed -e "s|DIR|%/t|g" %t/missing_header.json.in > %t/missing_header.json
30 // RUN: not clang-scan-deps -compilation-database %t/missing_header.json 2>%t/missing_header.errs
31 // RUN: echo EOF >> %t/missing_header.errs
32 // RUN: cat %t/missing_header.errs | sed 's:\\\\\?:/:g' | FileCheck %s --check-prefix=CHECK-MISSING-HEADER -DPREFIX=%/t
33 // CHECK-MISSING-HEADER: Error while scanning dependencies for [[PREFIX]]/missing_header.c
34 // CHECK-MISSING-HEADER-NEXT: fatal error: 'missing.h' file not found
35 // CHECK-MISSING-HEADER-NEXT: EOF