Make test more lenient for custom clang version strings
[llvm-project.git] / clang / test / Analysis / scan-build / exclude_directories.test
blob2c79ed842af11332a4269ee61e0c846fa5c453e9
1 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
2 RUN: %scan-build -o %t.output_dir %clang -S \
3 RUN:     %S/Inputs/multidirectory_project/directory1/file1.c \
4 RUN:     %S/Inputs/multidirectory_project/directory2/file2.c \
5 RUN:     | FileCheck %s -check-prefix CHECK-NO-EXCLUDE
7 // The purpose of this test is to ensure that the --exclude command line option
8 // actually excludes reports from inside the specified directories.
11 // First, let's make sure that without --exclude issues in both
12 // directory1 and directory2 are found.
13 CHECK-NO-EXCLUDE: scan-build: 2 bugs found.
16 // Only one issue should be found when directory1 is excluded.
17 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
18 RUN: %scan-build -o %t.output_dir --exclude directory1 %clang -S \
19 RUN:     %S/Inputs/multidirectory_project/directory1/file1.c \
20 RUN:     %S/Inputs/multidirectory_project/directory2/file2.c \
21 RUN:     | FileCheck %s -check-prefix CHECK-EXCLUDE1
23 CHECK-EXCLUDE1: scan-build: 1 bug found.
26 // When both directories are excluded, no issues should be reported.
27 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
28 RUN: %scan-build -o %t.output_dir --exclude directory1 --exclude directory2 %clang -S \
29 RUN:     %S/Inputs/multidirectory_project/directory1/file1.c \
30 RUN:     %S/Inputs/multidirectory_project/directory2/file2.c \
31 RUN:     | FileCheck %s -check-prefix CHECK-EXCLUDE-BOTH
33 CHECK-EXCLUDE-BOTH: scan-build: 0 bugs found.