1 | # -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79: |
2 | |
3 | import site |
4 | |
5 | # Load the custom analyzer test format, which runs the test again with Z3 if it |
6 | # is available. |
7 | site.addsitedir(os.path.dirname(__file__)) |
8 | import analyzer_test |
9 | config.test_format = analyzer_test.AnalyzerTest( |
10 | config.test_format.execute_external, config.use_z3_solver) |
11 | |
12 | # Diff command used by Clang Analyzer tests (when comparing .plist files |
13 | # with reference output) |
14 | config.substitutions.append(('%diff_plist', |
15 | 'diff -u -w -I "<string>/" -I "<string>.:" -I "version"')) |
16 | |
17 | # Diff command for testing SARIF output to reference output. |
18 | config.substitutions.append(('%diff_sarif', |
19 | '''diff -U1 -w -I ".*file:.*%basename_t" -I '"version":' -I "2\.0\.0\-csd\.[0-9]*\.beta\."''')) |
20 | |
21 | if not config.root.clang_staticanalyzer: |
22 | config.unsupported = True |
23 | |