Debian Codegraph @

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

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