ci: drop unneeded printing of pass/fail alongside the exit_code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35214>
This commit is contained in:
committed by
Marge Bot
parent
fe2c93a788
commit
5a5b00cfca
@@ -87,12 +87,11 @@ class PoERun:
|
||||
self.print_error("nouveau jetson tk1 network fail, abandoning run.")
|
||||
return 1
|
||||
|
||||
result = re.search(r"hwci: mesa: (\S*), exit_code: (\d+)", line)
|
||||
result = re.search(r"hwci: mesa: exit_code: (\d+)", line)
|
||||
if result:
|
||||
status = result.group(1)
|
||||
exit_code = int(result.group(2))
|
||||
exit_code = int(result.group(1))
|
||||
|
||||
if status == "pass":
|
||||
if exit_code == 0:
|
||||
self.logger.update_dut_job("status", "pass")
|
||||
else:
|
||||
self.logger.update_status_fail("test fail")
|
||||
|
||||
@@ -229,10 +229,6 @@ if [ -n "$S3_RESULTS_UPLOAD" ]; then
|
||||
ci-fairy s3cp --token-file "${S3_JWT_FILE}" results.tar.zst https://"$S3_RESULTS_UPLOAD"/results.tar.zst
|
||||
fi
|
||||
|
||||
# We still need to echo the hwci: mesa message, as some scripts rely on it, such
|
||||
# as the python ones inside the bare-metal folder
|
||||
[ ${EXIT_CODE} -eq 0 ] && RESULT=pass || RESULT=fail
|
||||
|
||||
set +x
|
||||
section_end post_test_cleanup
|
||||
|
||||
@@ -240,6 +236,6 @@ section_end post_test_cleanup
|
||||
# the result of our run, so try really hard to get it out rather than losing
|
||||
# the run. The device gets shut down right at this point, and a630 seems to
|
||||
# enjoy corrupting the last line of serial output before shutdown.
|
||||
for _ in $(seq 0 3); do echo "hwci: mesa: $RESULT, exit_code: $EXIT_CODE"; sleep 1; echo; done
|
||||
for _ in $(seq 0 3); do echo "hwci: mesa: exit_code: $EXIT_CODE"; sleep 1; echo; done
|
||||
|
||||
exit $EXIT_CODE
|
||||
|
||||
@@ -30,7 +30,7 @@ variables:
|
||||
|
||||
ALPINE_X86_64_BUILD_TAG: "20250423-rootfs"
|
||||
ALPINE_X86_64_LAVA_SSH_TAG: "20250423-rootfs"
|
||||
ALPINE_X86_64_LAVA_TRIGGER_TAG: "20250526-byeutils"
|
||||
ALPINE_X86_64_LAVA_TRIGGER_TAG: "20250529-passfail"
|
||||
|
||||
FEDORA_X86_64_BUILD_TAG: "20250423-rootfs"
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ def follow_job_execution(job, log_follower):
|
||||
raise_lava_error(job)
|
||||
|
||||
# LogFollower does some cleanup after the early exit (trigger by
|
||||
# `hwci: pass|fail` regex), let's update the phases after the cleanup.
|
||||
# `hwci: mesa: exit_code: \d+` regex), let's update the phases after the cleanup.
|
||||
structural_log_phases(job, log_follower)
|
||||
|
||||
|
||||
|
||||
@@ -175,10 +175,10 @@ class LAVAJob:
|
||||
last_line = None # Print all lines. lines[:None] == lines[:]
|
||||
|
||||
for idx, line in enumerate(lava_lines):
|
||||
if result := re.search(r"hwci: mesa: (pass|fail), exit_code: (\d+)", line):
|
||||
if result := re.search(r"hwci: mesa: exit_code: (\d+)", line):
|
||||
self._is_finished = True
|
||||
self.status = result.group(1)
|
||||
self.exit_code = int(result.group(2))
|
||||
self.exit_code = int(result.group(1))
|
||||
self.status = "pass" if self.exit_code == 0 else "fail"
|
||||
|
||||
last_line = idx
|
||||
# We reached the log end here. hwci script has finished.
|
||||
|
||||
@@ -393,7 +393,7 @@ yaml-toml-shell-py-test:
|
||||
|
||||
SCRIPTS_DIR: install
|
||||
|
||||
CI_TRON_PATTERN__JOB_SUCCESS__REGEX: 'hwci: mesa: pass, exit_code: 0\r$'
|
||||
CI_TRON_PATTERN__JOB_SUCCESS__REGEX: 'hwci: mesa: exit_code: 0\r$'
|
||||
CI_TRON_PATTERN__SESSION_END__REGEX: '^.*It''s now safe to turn off your computer\r$'
|
||||
|
||||
CI_TRON_TIMEOUT__FIRST_CONSOLE_ACTIVITY__MINUTES: 2
|
||||
|
||||
@@ -49,7 +49,7 @@ def jobs_logs_response(
|
||||
timed_msg = {"dt": str(datetime.now(tz=UTC)), "msg": "New message", "lvl": lvl}
|
||||
if result:
|
||||
timed_msg["lvl"] = "target"
|
||||
timed_msg["msg"] = f"hwci: mesa: {result}, exit_code: {exit_code}"
|
||||
timed_msg["msg"] = f"hwci: mesa: exit_code: {exit_code}"
|
||||
|
||||
logs = [timed_msg] if msg is None else msg
|
||||
|
||||
@@ -72,7 +72,7 @@ def section_aware_message_generator(
|
||||
if result and section_type == result_message_section:
|
||||
# To consider the job finished, the result `echo` should be produced
|
||||
# in the correct section
|
||||
yield create_lava_yaml_msg(msg=f"hwci: mesa: {result}, exit_code: {exit_code}"), delay
|
||||
yield create_lava_yaml_msg(msg=f"hwci: mesa: exit_code: {exit_code}"), delay
|
||||
|
||||
|
||||
def message_generator():
|
||||
|
||||
@@ -337,27 +337,27 @@ def test_log_corruption(mock_sleep, data_sequence, expected_exception, mock_prox
|
||||
LAVA_RESULT_LOG_SCENARIOS = {
|
||||
# the submitter should accept xtrace logs
|
||||
"Bash xtrace echo with kmsg interleaving": (
|
||||
"echo hwci: mesa: pass, exit_code: 0[ 737.673352] <LAVA_SIGNAL_ENDTC mesa-ci>",
|
||||
"echo hwci: mesa: exit_code: 0[ 737.673352] <LAVA_SIGNAL_ENDTC mesa-ci>",
|
||||
"pass", 0,
|
||||
),
|
||||
# the submitter should accept xtrace logs
|
||||
"kmsg result print": (
|
||||
"[ 737.673352] hwci: mesa: pass, exit_code: 0",
|
||||
"[ 737.673352] hwci: mesa: exit_code: 0",
|
||||
"pass", 0,
|
||||
),
|
||||
# if the job result echo has a very bad luck, it still can be interleaved
|
||||
# with kmsg
|
||||
"echo output with kmsg interleaving": (
|
||||
"hwci: mesa: pass, exit_code: 0[ 737.673352] <LAVA_SIGNAL_ENDTC mesa-ci>",
|
||||
"hwci: mesa: exit_code: 0[ 737.673352] <LAVA_SIGNAL_ENDTC mesa-ci>",
|
||||
"pass", 0,
|
||||
),
|
||||
"fail case": (
|
||||
"hwci: mesa: fail, exit_code: 1",
|
||||
"hwci: mesa: exit_code: 1",
|
||||
"fail", 1,
|
||||
),
|
||||
# fail case with different exit code
|
||||
"fail case (exit code 101)": (
|
||||
"hwci: mesa: fail, exit_code: 101",
|
||||
"hwci: mesa: exit_code: 101",
|
||||
"fail", 101,
|
||||
),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user