1 // RUN: rm -rf %t.dir
2 // RUN: rm -rf %t.cdb
3 // RUN: mkdir -p %t.dir
4 // RUN: cp %s %t.dir/regular_cdb_input.cpp
5 // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/regular_cdb.json > %t.cdb
6 // RUN: sed -e "s|DIR|%/t.dir|g" %S/Inputs/regular_cdb_clangcl.json > %t_clangcl.cdb
7 //
8 // RUN: not clang-scan-deps -compilation-database %t.cdb -j 1 2>%t.dir/errs
9 // RUN: echo EOF >> %t.dir/errs
10 // RUN: FileCheck %s --input-file %t.dir/errs
11 
12 // RUN: not clang-scan-deps -compilation-database %t_clangcl.cdb -j 1 2>%t.dir/errs_clangcl
13 // RUN: echo EOF >> %t.dir/errs_clangcl
14 // RUN: FileCheck %s --input-file %t.dir/errs_clangcl
15 
16 #include "missing.h"
17 
18 // CHECK: Error while scanning dependencies
19 // CHECK-NEXT: error: no such file or directory:
20 // CHECK-NEXT: error: no input files
21 // CHECK-NEXT: error:
22 // CHECK-NEXT: Error while scanning dependencies
23 // CHECK-NEXT: fatal error: 'missing.h' file not found
24 // CHECK-NEXT: Error while scanning dependencies
25 // CHECK-NEXT: fatal error: 'missing.h' file not found
26 // CHECK-NEXT: EOF
27