1 # -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79:
2 from lit.llvm.subst import ToolSubst
5 # Load the custom analyzer test format, which runs the test again with Z3 if it
7 site.addsitedir(os.path.dirname(__file__))
10 config.test_format = analyzer_test.AnalyzerTest(
11 config.test_format.execute_external, config.use_z3_solver
14 # Filtering command used by Clang Analyzer tests (when comparing .plist files
15 # with reference output)
16 config.substitutions.append(
21 "^[[:space:]]*<string>.* version .*</string>[[:space:]]*$",
22 "^[[:space:]]*<string>/.*</string>[[:space:]]*$",
23 "^[[:space:]]*<string>.:.*</string>[[:space:]]*$",
28 # Filtering command for testing SARIF output against reference output.
29 config.substitutions.append(
32 "grep -Ev '^[[:space:]]*(%s|%s|%s)[[:space:]]*$'"
34 '"uri": "file:.*%basename_t"',
35 '"version": ".* version .*"',
41 if not config.root.clang_staticanalyzer:
42 config.unsupported = True