[PATCH] D62949: [analyzer][tests] Add normalize_plist to replace diff_plist
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 10 15:31:16 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362994: [analyzer][tests] Add normalize_plist to replace diff_plist (authored by hubert.reinterpretcast, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62949/new/
https://reviews.llvm.org/D62949
Files:
cfe/trunk/test/Analysis/lit.local.cfg
cfe/trunk/test/Analysis/unix-fns.c
Index: cfe/trunk/test/Analysis/unix-fns.c
===================================================================
--- cfe/trunk/test/Analysis/unix-fns.c
+++ cfe/trunk/test/Analysis/unix-fns.c
@@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,unix.API,osx.API,optin.portability %s -analyzer-store=region -analyzer-output=plist -analyzer-config faux-bodies=true -fblocks -verify -o %t.plist
-// RUN: cat %t.plist | %diff_plist %S/Inputs/expected-plists/unix-fns.c.plist -
+// RUN: %normalize_plist <%t.plist | diff -u %S/Inputs/expected-plists/unix-fns.c.plist -
// RUN: mkdir -p %t.dir
// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.API,osx.API,optin.portability -analyzer-output=html -analyzer-config faux-bodies=true -fblocks -o %t.dir %s
// RUN: rm -fR %t.dir
Index: cfe/trunk/test/Analysis/lit.local.cfg
===================================================================
--- cfe/trunk/test/Analysis/lit.local.cfg
+++ cfe/trunk/test/Analysis/lit.local.cfg
@@ -14,6 +14,14 @@
config.substitutions.append(('%diff_plist',
'diff -u -w -I "<string>/" -I "<string>.:" -I "version"'))
+# Filtering command used by Clang Analyzer tests (when comparing .plist files
+# with reference output)
+config.substitutions.append(('%normalize_plist',
+ "grep -Ev '%s|%s|%s'" %
+ ('^[[:space:]]*<string>.* version .*</string>$',
+ '^[[:space:]]*<string>/.*</string>$',
+ '^[[:space:]]*<string>.:.*</string>$')))
+
# Diff command for testing SARIF output to reference output.
config.substitutions.append(('%diff_sarif',
'''diff -U1 -w -I ".*file:.*%basename_t" -I '"version":' -I "2\.0\.0\-csd\.[0-9]*\.beta\."'''))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62949.203913.patch
Type: text/x-patch
Size: 1695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190610/f35064cb/attachment.bin>
More information about the cfe-commits
mailing list