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

failure detection fixes & clean qemu shutdown #7

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions tortillas/log_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ def analyze(
else TestStatus[config_entry.set_status]
)

if not logs:
continue
# fixme: this is flawed, why is this here?
# when tortillas gets no logs and and aborts, it can't detect incorrect or missing exit codes
# as a result, every test with incorrect exit codes passes
# if not logs:
# continue
PaideiaDilemma marked this conversation as resolved.
Show resolved Hide resolved

if config_entry.mode == "add_as_error":
result.add_errors(logs, status)
Expand Down
8 changes: 6 additions & 2 deletions tortillas/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def run_test(test_queue: list[TestRun]):
# Testing finished

self.success = not any(
test_run.result.status in (TestStatus.FAILED, TestStatus.PANIC)
test_run.result.status in (TestStatus.FAILED, TestStatus.PANIC, TestStatus.TIMEOUT)
for test_run in self.test_runs
)

Expand Down Expand Up @@ -381,8 +381,12 @@ def _run(

# Wait a bit for cleanup and debug output to be flushed
time.sleep(1)
# analyze before exiting the shell, to keep exit codes intact
test.analyze(status)

test.analyze(status)
# exit the shell, so files are written to the qcow2 image
qemu.sweb_input("exit\n")
time.sleep(1)

log.info("Done!")
if callback:
Expand Down