Debian Codegraph @

clang/test/Analysis/scan-build/html_output.test

raw
1 REQUIRES: shell
2
3 RUN: rm -rf %t.output_dir && mkdir %t.output_dir
4 RUN: %scan-build -o %t.output_dir %clang -S %S/Inputs/single_null_dereference.c \
5 RUN: | FileCheck %s -check-prefix CHECK-STDOUT
6
7 // Test html output
8
9 CHECK-STDOUT: scan-build: Using '{{.*}}' for static analysis
10 CHECK-STDOUT: scan-build: 1 bug found.
11 CHECK-STDOUT: scan-build: Run 'scan-view {{.*}}' to examine bug reports.
12
13 // We expect an index file, a file for the report, and sibling support files.
14 RUN: ls %t.output_dir/*/ | FileCheck %s -check-prefix CHECK-FILENAMES
15
16 CHECK-FILENAMES: index.html
17 CHECK-FILENAMES: report-{{.*}}.html
18 CHECK-FILENAMES: scanview.css
19 CHECK-FILENAMES: sorttable.js
20
21 // Tests for the front page.
22 RUN: cat %t.output_dir/*/index.html \
23 RUN: | FileCheck %s -check-prefix CHECK-INDEX-HTML
24
25 // Let's confirm that the new filtering facility is present.
26 CHECK-INDEX-HTML: Filter Results by File
27
28 // The index should have a link to the report for the single issue.
29 CHECK-INDEX-HTML: <!-- REPORTBUG id="report-{{.*}}.html" -->
30
31
32 // The report should describe the issue.
33 RUN: cat %t.output_dir/*/report-*.html \
34 RUN: | FileCheck %s -check-prefix CHECK-REPORT-HTML
35
36 CHECK-REPORT-HTML: <!-- BUGTYPE Dereference of null pointer -->