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