@@ -51,12 +51,14 @@ def __init__(self, logger):
5151 def run_with_config (self , config_path ):
5252 args = ["--conf" , config_path ] + self .other_args
5353 self .logger .info (f"Running next shot: ./goblint { " " .join (args )} " )
54- try :
55- output = subprocess .check_output ([self .goblint_executable_path , * args ]
56- ,stderr = subprocess .STDOUT ).decode ("utf-8" )
57- except subprocess .CalledProcessError as e :
58- output = e .output .decode ("utf-8" )
59-
54+ process = subprocess .Popen ([self .goblint_executable_path , * args ],stdout = subprocess .PIPE ,stderr = subprocess .STDOUT )
55+ output = []
56+ for line in process .stdout :
57+ decoded_line = line .decode ("utf-8" )
58+ print (decoded_line , end = "" )
59+ output .append (decoded_line )
60+ process .wait ()
61+ output = "" .join (output )
6062 return ExecutionResult (output , self .verdict_true_or_error (output ))
6163
6264 def run_without_config (self ):
@@ -76,7 +78,6 @@ def run(self):
7678 result = self .run_with_config (config )
7779 if result .verdict_true_or_error :
7880 break
79- print (result .output )
8081
8182class GoblintLikeFormatter (logging .Formatter ):
8283 LEVEL_NAMES = {
0 commit comments