Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update run_conformance.py #1954

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions test_conformance/run_conformance.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import tempfile

DEBUG = 0
retry=0
RETRY_COUNT=3


log_file_name = "opencl_conformance_results_" + time.strftime("%Y-%m-%d_%H-%M", time.localtime()) + ".log"
process_pid = 0
Expand Down Expand Up @@ -213,6 +216,7 @@ def run_tests(tests):
failures = 0
previous_test = None
test_number = 1
failed_tests=[]
for test in tests:
# Print the name of the test we're running and the time
(test_name, test_dir) = test
Expand Down Expand Up @@ -270,12 +274,15 @@ def run_tests(tests):
log_file.write(" * (" + get_time() + ") Test " + test_name + " ==> FAILED: " + str(result) + "\n")
log_file.write(" *******************************************************************************************\n")
failures = failures + 1
#keep failed test_name in a list

failed_tests.append(test)
else:
log_file.write(" (" + get_time() + ") Test " + test_name + " passed in " + str(run_time) + "s\n")

log_file.write(" ----------------------------------------------------------------------------------------\n")
log_file.write("\n")
return failures
return failures,failed_tests


# ########################
Expand Down Expand Up @@ -353,12 +360,20 @@ def run_tests(tests):
write_screen_log(("Setting CL_DEVICE_TYPE to " + device_to_test).center(90))
write_screen_log("========================================================================================")
write_screen_log("========================================================================================")
failures = run_tests(tests)
failures,failed_tests = run_tests(tests)
write_screen_log("========================================================================================")
if failures == 0:
write_screen_log(">> TEST on " + device_to_test + " PASSED")
else:
write_screen_log(">> TEST on " + device_to_test + " FAILED (" + str(failures) + " FAILURES)")
write_screen_log("Failed tests are"+ str(failed_tests))
#if retry < RETRY_COUNT then retry the failed tests
write_screen_log("Retrying failed tests")
if retry < RETRY_COUNT:
failures,failed_tests = run_tests(failed_tests)
retry=retry+1


write_screen_log("========================================================================================")
total_failures = total_failures + failures

Expand Down
Loading