xref: /llvm-project/clang/test/Analysis/scan-build/plist_output.test (revision 2868e26d0a6f257d3a8f303c7918f37c690e35a4)
1REQUIRES: shell
2
3RUN: rm -rf %t.output_dir && mkdir %t.output_dir
4RUN: %scan-build -plist -o %t.output_dir %clang -S %S/Inputs/single_null_dereference.c \
5RUN:     | FileCheck %s -check-prefix CHECK-STDOUT
6
7// Test plist output
8
9CHECK-STDOUT: scan-build: Using '{{.*}}' for static analysis
10CHECK-STDOUT: scan-build: Analysis run complete.
11CHECK-STDOUT: scan-build: Analysis results (plist files) deposited in '{{.*}}'
12
13// We expect a single plist file
14RUN: ls %t.output_dir/*/ | FileCheck %s -check-prefix CHECK-FILENAMES
15
16CHECK-FILENAMES: report-{{.*}}.plist
17
18// The report should describe the issue.
19RUN: cat %t.output_dir/*/report-*.plist \
20RUN:     | FileCheck %s -check-prefix CHECK-REPORT-PLIST-CONTENTS
21
22CHECK-REPORT-PLIST-CONTENTS: <key>type</key><string>Dereference of null pointer</string>
23