1 // FIXME: Actually, "perl".
4 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
5 RUN: %scan-build -o %t.output_dir %clang -S \
6 RUN: %S/Inputs/multidirectory_project/directory1/file1.c \
7 RUN: %S/Inputs/multidirectory_project/directory2/file2.c \
8 RUN: | FileCheck %s -check-prefix CHECK-NO-EXCLUDE
10 // The purpose of this test is to ensure that the --exclude command line option
11 // actually excludes reports from inside the specified directories.
14 // First, let's make sure that without --exclude issues in both
15 // directory1 and directory2 are found.
16 CHECK-NO-EXCLUDE: scan-build: 2 bugs found.
19 // Only one issue should be found when directory1 is excluded.
20 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
21 RUN: %scan-build -o %t.output_dir --exclude directory1 %clang -S \
22 RUN: %S/Inputs/multidirectory_project/directory1/file1.c \
23 RUN: %S/Inputs/multidirectory_project/directory2/file2.c \
24 RUN: | FileCheck %s -check-prefix CHECK-EXCLUDE1
26 CHECK-EXCLUDE1: scan-build: 1 bug found.
29 // When both directories are excluded, no issues should be reported.
30 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
31 RUN: %scan-build -o %t.output_dir --exclude directory1 --exclude directory2 %clang -S \
32 RUN: %S/Inputs/multidirectory_project/directory1/file1.c \
33 RUN: %S/Inputs/multidirectory_project/directory2/file2.c \
34 RUN: | FileCheck %s -check-prefix CHECK-EXCLUDE-BOTH
36 CHECK-EXCLUDE-BOTH: scan-build: 0 bugs found.