diff options
Diffstat (limited to 'scripts/testing/run-test-baremetal.sh')
| -rwxr-xr-x | scripts/testing/run-test-baremetal.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/testing/run-test-baremetal.sh b/scripts/testing/run-test-baremetal.sh index d22c424..d837389 100755 --- a/scripts/testing/run-test-baremetal.sh +++ b/scripts/testing/run-test-baremetal.sh @@ -228,14 +228,17 @@ if ! $VALIDATE_ONLY; then if [ $POLL_COUNT -ge $MAX_POLLS ]; then error "ArchSetup timed out after 90 minutes" - ARCHSETUP_EXIT_CODE=124 + ARCHSETUP_COMPLETED=timeout else - step "Retrieving archsetup exit status" + # The installer runs detached with set -e off, so its real exit + # status is unavailable; the marker only proves the script reached + # its last line. Testinfra is the pass/fail authority. + step "Checking for the archsetup completion marker" if ssh_cmd "grep -q 'ARCHSETUP_EXECUTION_COMPLETE' /var/log/archsetup-*.log 2>/dev/null"; then - ARCHSETUP_EXIT_CODE=0 + ARCHSETUP_COMPLETED=yes success "ArchSetup completed successfully" else - ARCHSETUP_EXIT_CODE=1 + ARCHSETUP_COMPLETED=no error "ArchSetup may have encountered errors" fi fi @@ -259,7 +262,7 @@ if ! $VALIDATE_ONLY; then capture_post_install_state "$TEST_RESULTS_DIR" else info "Skipping archsetup (--validate-only)" - ARCHSETUP_EXIT_CODE=0 + ARCHSETUP_COMPLETED=yes mkdir -p "$TEST_RESULTS_DIR/pre-install" "$TEST_RESULTS_DIR/post-install" fi @@ -302,7 +305,7 @@ Target: $TARGET_HOST Test Method: Bare Metal ZFS Results: - ArchSetup Exit Code: $ARCHSETUP_EXIT_CODE + ArchSetup Completed: $ARCHSETUP_COMPLETED (completion marker, not the installer's exit code) Validation: $(if $TEST_PASSED; then echo "PASSED"; else echo "FAILED"; fi) Validation Summary: @@ -335,7 +338,7 @@ fi # Final summary section "Test Complete" -if [ "$ARCHSETUP_EXIT_CODE" -eq 0 ] && $TEST_PASSED; then +if [ "$ARCHSETUP_COMPLETED" = "yes" ] && $TEST_PASSED; then success "TEST PASSED" exit 0 else |
