From: Kienan Stewart Date: Thu, 11 Jan 2024 20:10:03 +0000 (-0500) Subject: jjb/lava: Correct YAML loading for lava job results X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=ad6b169e0b022e5487962a570fd6a4aff29c1b55;p=lttng-ci.git jjb/lava: Correct YAML loading for lava job results Change-Id: I7d2a7d4eeb0192c4ac1b83547683fc02589ccc76 Signed-off-by: Kienan Stewart --- diff --git a/scripts/system-tests/lava2-submit.py b/scripts/system-tests/lava2-submit.py index 5a08abd..dfd7ad4 100644 --- a/scripts/system-tests/lava2-submit.py +++ b/scripts/system-tests/lava2-submit.py @@ -83,7 +83,7 @@ def check_job_all_test_cases_state_count(server, job): """ print("Testcase result:") content = server.results.get_testjob_results_yaml(str(job)) - testcases = yaml.load(content) + testcases = yaml.load(content, Loader=yaml.Loader) passed_tests = 0 failed_tests = 0 @@ -105,7 +105,7 @@ def print_test_output(server, job): Parse the attachment of the testcase to fetch the stdout of the test suite """ job_finished, log = server.scheduler.jobs.logs(str(job)) - logs = yaml.load(log.data.decode('ascii')) + logs = yaml.load(log.data.decode('ascii'), Loader=yaml.Loader) print_line = False for line in logs: if line['lvl'] != 'target':