@@ -121,6 +121,7 @@ def fuzz_test_main(test_file_name, group, test, var, original_value, all_outputs
121
121
if time_taken >= TIMEOUT :
122
122
timeout = True
123
123
all_outputs .append (TIMEOUT_MESSAGE )
124
+ run_result = ""
124
125
125
126
# Update results
126
127
# Total run
@@ -132,38 +133,49 @@ def fuzz_test_main(test_file_name, group, test, var, original_value, all_outputs
132
133
# Test error + 1
133
134
results_dictionary [test_file_name ][TEST_ERRORS ] = results_dictionary [test_file_name ][TEST_ERRORS ] + 1
134
135
test_error = True
136
+ run_result = TEST_ERRORS
135
137
# If failed test message not found
136
138
else :
137
139
# Successful test + 1
138
140
results_dictionary [test_file_name ][SUCCESSFUL_RUNS ] = results_dictionary [test_file_name ][SUCCESSFUL_RUNS ] + 1
141
+ run_result = SUCCESSFUL_RUNS
139
142
# If successful test message not found
140
143
else :
141
144
# If failed test message found
142
145
if re .search (encode_if_condition (FAILED_TEST_PATTERN , encoded ), output ):
143
146
# Failed test + 1
144
147
results_dictionary [test_file_name ][FAILED_RUNS ] = results_dictionary [test_file_name ][FAILED_RUNS ] + 1
148
+ run_result = FAILED_RUNS
145
149
# If failed test message not found
146
150
else :
147
151
# If timeout
148
152
if timeout :
149
153
# Hang + 1
150
154
results_dictionary [test_file_name ][HANGS ] = results_dictionary [test_file_name ][HANGS ] + 1
155
+ run_result = HANGS
151
156
# If not timeout
152
157
else :
153
158
# If assertion message found
154
159
if re .search (encode_if_condition (ASSERTION_FAILURE_PATTERN , encoded ), output ):
155
160
# Assertion failures + 1
156
161
results_dictionary [test_file_name ][ASSERTION_FAILURES ] = results_dictionary [test_file_name ][ASSERTION_FAILURES ] + 1
162
+ run_result = ASSERTION_FAILURES
157
163
# If assertion message not found
158
164
else :
159
165
# Aborted run + 1
160
166
results_dictionary [test_file_name ][ABORTED_RUNS ] = results_dictionary [test_file_name ][ABORTED_RUNS ] + 1
167
+ run_result = ABORTED_RUNS
168
+ # Print run result to output
169
+ all_outputs .append (run_result + " + 1" )
161
170
# ASAN errors
162
171
if re .search (encode_if_condition (ASAN_ERROR_PATTERN , encoded ), output ):
163
172
results_dictionary [test_file_name ][ASAN_ERRORS ] = results_dictionary [test_file_name ][ASAN_ERRORS ] + 1
173
+ all_outputs .append (ASAN_ERRORS + " + 1" )
164
174
# Test errors
165
175
if re .search (encode_if_condition (FUZZ_TEST_ERROR_PATTERN , encoded ), output ) and not test_error :
166
176
results_dictionary [test_file_name ][TEST_ERRORS ] = results_dictionary [test_file_name ][TEST_ERRORS ] + 1
177
+ all_outputs .append (TEST_ERRORS + " + 1" )
178
+ all_outputs .append ("\n " )
167
179
168
180
def load_yaml (test_file_name ):
169
181
# Fetch data from original_inputs
0 commit comments