diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /test/Analysis/analyzer_test.py | |
parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) |
Diffstat (limited to 'test/Analysis/analyzer_test.py')
-rw-r--r-- | test/Analysis/analyzer_test.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Analysis/analyzer_test.py b/test/Analysis/analyzer_test.py index 0aa2dbc1bb09d..03124333fe7bf 100644 --- a/test/Analysis/analyzer_test.py +++ b/test/Analysis/analyzer_test.py @@ -4,6 +4,10 @@ import lit.TestRunner # Custom format class for static analyzer tests class AnalyzerTest(lit.formats.ShTest): + def __init__(self, execute_external, use_z3_solver=False): + super(AnalyzerTest, self).__init__(execute_external) + self.use_z3_solver = use_z3_solver + def execute(self, test, litConfig): results = [] @@ -19,7 +23,8 @@ class AnalyzerTest(lit.formats.ShTest): return results[-1] # If z3 backend available, add an additional run line for it - if test.config.clang_staticanalyzer_z3 == '1': + if self.use_z3_solver == '1': + assert(test.config.clang_staticanalyzer_z3 == '1') results.append(self.executeWithAnalyzeSubstitution( saved_test, litConfig, '-analyzer-constraints=z3 -DANALYZER_CM_Z3')) |