1// FIXME: Actually, "perl".
2REQUIRES: shell
3
4RUN: rm -rf %t.output_dir && mkdir %t.output_dir
5RUN: %scan-build -o %t.output_dir \
6RUN:             %clang -S %S/Inputs/deduplication/1.c \
7RUN:                       %S/Inputs/deduplication/2.c \
8RUN:     | FileCheck %s -check-prefix CHECK-STDOUT
9
10RUN: ls %t.output_dir/*/ | FileCheck %s -check-prefix CHECK-FILENAMES
11
12RUN: rm -rf %t.output_dir && mkdir %t.output_dir
13RUN: %scan-build -o %t.output_dir \
14RUN:             -analyzer-config stable-report-filename=true \
15RUN:             %clang -S %S/Inputs/deduplication/1.c \
16RUN:                       %S/Inputs/deduplication/2.c \
17RUN:     | FileCheck %s -check-prefix CHECK-STDOUT
18
19RUN: ls %t.output_dir/*/ | FileCheck %s -check-prefix CHECK-FILENAMES
20
21RUN: rm -rf %t.output_dir && mkdir %t.output_dir
22RUN: %scan-build -o %t.output_dir \
23RUN:             -analyzer-config verbose-report-filename=true \
24RUN:             %clang -S %S/Inputs/deduplication/1.c \
25RUN:                       %S/Inputs/deduplication/2.c \
26RUN:     | FileCheck %s -check-prefix CHECK-STDOUT
27
28RUN: ls %t.output_dir/*/ | FileCheck %s -check-prefix CHECK-FILENAMES
29
30// Only one report file should be generated.
31
32CHECK-STDOUT: scan-build: Using '{{.*}}' for static analysis
33CHECK-STDOUT: scan-build: 1 bug found.
34CHECK-STDOUT: scan-build: Run 'scan-view {{.*}}' to examine bug reports.
35
36
37CHECK-FILENAMES: index.html
38CHECK-FILENAMES-NEXT: report-{{.*}}.html
39CHECK-FILENAMES-NEXT: scanview.css
40CHECK-FILENAMES-NEXT: sorttable.js
41