mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-24 02:34:17 +08:00
gitlab-ci: correct tracie behavior with replay errors
[dump_trace_images] Info: Dumping trace /tmp/tracie.test.ap5pshYcsg/traces-db/trace1/magenta.testtrace... ERROR [dump_trace_images] Debug: === Failure log start === invalid literal for int() with base 16: 'in' [dump_trace_images] Debug: === Failure log end === [check_image] Trace /tmp/tracie.test.ap5pshYcsg/traces-db/trace1/magenta.testtrace couldn't be replayed. See above logs for more information. Traceback (most recent call last): File "/tmp/tracie.test.ap5pshYcsg/tracie.py", line 176, in <module> main() File "/tmp/tracie.test.ap5pshYcsg/tracie.py", line 164, in main ok, result = gitlab_check_trace(project_url, commit_id, args.device_name, trace, expectation) TypeError: cannot unpack non-iterable bool object Fixes:efbbf8bb81
("tracie: Print results in a machine readable format") Signed-off-by: Andres Gomez <agomez@igalia.com> Reviewed-by: Rohan Garg <rohan.garg@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4839> (cherry picked from commita6beb051af
)
This commit is contained in:
parent
d1e3c0b430
commit
ed872abd56
@ -106,6 +106,7 @@ tracie_fails_on_dump_image_error() {
|
||||
|
||||
run_tracie
|
||||
assert "[ $? != 0 ]"
|
||||
assert_results_yaml_contains "error" "8e0a801367e1714463475a824dab363b" "trace1/magenta.testtrace" "$PWD/results/results.yml"
|
||||
}
|
||||
|
||||
tracie_stores_only_logs_on_checksum_match() {
|
||||
|
@ -106,11 +106,13 @@ def gitlab_check_trace(project_url, repo_commit, device_name, trace, expectation
|
||||
|
||||
result = {}
|
||||
result[trace['path']] = {}
|
||||
result[trace['path']]['expected'] = expectation['checksum']
|
||||
|
||||
trace_path = Path(TRACES_DB_PATH + trace['path'])
|
||||
checksum, image_file, log_file = replay(trace_path, device_name)
|
||||
if checksum is None:
|
||||
return False
|
||||
result[trace['path']]['actual'] = 'error'
|
||||
return False, result
|
||||
elif checksum == expectation['checksum']:
|
||||
print("[check_image] Images match for %s" % (trace['path']))
|
||||
ok = True
|
||||
@ -131,7 +133,6 @@ def gitlab_check_trace(project_url, repo_commit, device_name, trace, expectation
|
||||
shutil.move(image_file, os.path.join(results_path, image_name))
|
||||
result[trace['path']]['image'] = os.path.join(dir_in_results, image_name)
|
||||
|
||||
result[trace['path']]['expected'] = expectation['checksum']
|
||||
result[trace['path']]['actual'] = checksum
|
||||
|
||||
return ok, result
|
||||
|
@ -22,7 +22,7 @@
|
||||
"description": "gitlab-ci: correct tracie behavior with replay errors",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "efbbf8bb81e97a2b2d2e6e018750ef36cd460676"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user