35 lines · plain
1RUN: rm -rf %t.output_dir && mkdir %t.output_dir2RUN: %scan-build -o %t.output_dir %clang -S \3RUN: %S/Inputs/multidirectory_project/directory1/file1.c \4RUN: %S/Inputs/multidirectory_project/directory2/file2.c \5RUN: | FileCheck %s -check-prefix CHECK-NO-EXCLUDE6 7// The purpose of this test is to ensure that the --exclude command line option8// actually excludes reports from inside the specified directories.9 10 11// First, let's make sure that without --exclude issues in both12// directory1 and directory2 are found.13CHECK-NO-EXCLUDE: scan-build: 2 bugs found.14 15 16// Only one issue should be found when directory1 is excluded.17RUN: rm -rf %t.output_dir && mkdir %t.output_dir18RUN: %scan-build -o %t.output_dir --exclude directory1 %clang -S \19RUN: %S/Inputs/multidirectory_project/directory1/file1.c \20RUN: %S/Inputs/multidirectory_project/directory2/file2.c \21RUN: | FileCheck %s -check-prefix CHECK-EXCLUDE122 23CHECK-EXCLUDE1: scan-build: 1 bug found.24 25 26// When both directories are excluded, no issues should be reported.27RUN: rm -rf %t.output_dir && mkdir %t.output_dir28RUN: %scan-build -o %t.output_dir --exclude directory1 --exclude directory2 %clang -S \29RUN: %S/Inputs/multidirectory_project/directory1/file1.c \30RUN: %S/Inputs/multidirectory_project/directory2/file2.c \31RUN: | FileCheck %s -check-prefix CHECK-EXCLUDE-BOTH32 33CHECK-EXCLUDE-BOTH: scan-build: 0 bugs found.34 35