aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/run-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/testing/run-test.sh')
-rwxr-xr-xscripts/testing/run-test.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/scripts/testing/run-test.sh b/scripts/testing/run-test.sh
index f962df3..a5c3691 100755
--- a/scripts/testing/run-test.sh
+++ b/scripts/testing/run-test.sh
@@ -280,15 +280,17 @@ done
if [ $POLL_COUNT -ge $MAX_POLLS ]; then
error "ArchSetup timed out after 150 minutes"
- ARCHSETUP_EXIT_CODE=124
+ ARCHSETUP_COMPLETED=timeout
else
- # Get exit code from the remote log
- step "Retrieving archsetup exit status..."
- ARCHSETUP_EXIT_CODE=$(vm_exec "$ROOT_PASSWORD" \
- "grep -q 'ARCHSETUP_EXECUTION_COMPLETE' /var/log/archsetup-*.log 2>/dev/null && echo 0 || echo 1" \
+ # The installer runs detached with set -e off, so its real exit status
+ # is unavailable here; the completion marker only proves the script ran
+ # to its last line. Testinfra below is the actual pass/fail authority.
+ step "Checking for the archsetup completion marker..."
+ ARCHSETUP_COMPLETED=$(vm_exec "$ROOT_PASSWORD" \
+ "grep -q 'ARCHSETUP_EXECUTION_COMPLETE' /var/log/archsetup-*.log 2>/dev/null && echo yes || echo no" \
2>/dev/null)
- if [ "$ARCHSETUP_EXIT_CODE" = "0" ]; then
+ if [ "$ARCHSETUP_COMPLETED" = "yes" ]; then
success "ArchSetup completed successfully"
else
error "ArchSetup may have encountered errors (check logs)"
@@ -370,7 +372,7 @@ VM Configuration:
SSH: localhost:$SSH_PORT
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:
@@ -424,7 +426,7 @@ CLEANUP_DONE=1
# Final summary
section "Test Complete"
-if [ "$ARCHSETUP_EXIT_CODE" = "0" ] && $TEST_PASSED; then
+if [ "$ARCHSETUP_COMPLETED" = "yes" ] && $TEST_PASSED; then
success "TEST PASSED"
exit 0
else