summaryrefslogtreecommitdiff
path: root/test/Analysis/analyzer_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/analyzer_test.py')
-rw-r--r--test/Analysis/analyzer_test.py7
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'))