blob: 52fe3f7da467e62a976713cf3abd659f9b25da4d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# SPDX-License-Identifier: GPL-3.0-or-later
"""Post-install checks: archsetup's own log and state markers.
Parity port of validate_archsetup_log and validate_state_markers.
"""
import pytest
EXPECTED_STATE_STEPS = 12
@pytest.mark.attribution("archsetup")
def test_no_errors_in_archsetup_log(host):
out = host.run("grep -h '^Error:' /var/log/archsetup-*.log 2>/dev/null | wc -l")
count = int((out.stdout.strip() or "0"))
assert count == 0, "archsetup log reported %d Error: lines" % count
@pytest.mark.attribution("archsetup")
def test_all_install_steps_completed(host):
out = host.run("ls /var/lib/archsetup/state/ 2>/dev/null | wc -l")
count = int((out.stdout.strip() or "0"))
assert count >= EXPECTED_STATE_STEPS, (
"only %d/%d install steps completed" % (count, EXPECTED_STATE_STEPS)
)
|