diff options
| -rw-r--r-- | scripts/testing/lib/validation.sh | 51 | ||||
| -rwxr-xr-x | scripts/testing/run-test.sh | 10 |
2 files changed, 9 insertions, 52 deletions
diff --git a/scripts/testing/lib/validation.sh b/scripts/testing/lib/validation.sh index 5fa747d..5d9587d 100644 --- a/scripts/testing/lib/validation.sh +++ b/scripts/testing/lib/validation.sh @@ -534,63 +534,12 @@ validate_portal_dark_mode() { fi } -validate_hyprland_plugins() { - step "Checking Hyprland plugins setup script" - - # Plugins are installed on first login via hyprland-plugins-setup script - # (hyprpm requires running Hyprland to determine version for compilation) - # Validate that the setup script exists and is executable - local setup_script="/home/cjennings/.local/bin/hyprland-plugins-setup" - if ! ssh_cmd "test -x $setup_script"; then - validation_fail "Hyprland plugins setup script not found or not executable" - attribute_issue "hyprland-plugins-setup script missing" "archsetup" - return 1 - fi - - # Check that hyprland.conf calls the setup script - if ssh_cmd "grep -q 'hyprland-plugins-setup' /home/cjennings/.config/hypr/hyprland.conf"; then - validation_pass "Hyprland plugins setup configured (installs on first login)" - else - validation_fail "hyprland.conf doesn't call hyprland-plugins-setup" - attribute_issue "hyprland-plugins-setup not in hyprland.conf" "archsetup" - fi -} - -validate_hyprpm_hook() { - step "Checking hyprpm pacman hook" - - local hook_file="/etc/pacman.d/hooks/hyprpm.hook" - if ! ssh_cmd "test -f $hook_file"; then - validation_fail "hyprpm pacman hook not found at $hook_file" - attribute_issue "hyprpm pacman hook missing" "archsetup" - return 1 - fi - - # Verify hook targets hyprland package - if ! ssh_cmd "grep -q 'Target = hyprland' $hook_file"; then - validation_fail "hyprpm hook doesn't target hyprland package" - attribute_issue "hyprpm hook misconfigured" "archsetup" - return 1 - fi - - # Verify hook runs hyprpm update - if ! ssh_cmd "grep -q 'hyprpm update' $hook_file"; then - validation_fail "hyprpm hook doesn't run hyprpm update" - attribute_issue "hyprpm hook misconfigured" "archsetup" - return 1 - fi - - validation_pass "hyprpm pacman hook configured correctly" -} - validate_window_manager() { # Detect which desktop environment is installed and validate accordingly if ssh_cmd "pacman -Q hyprland &>/dev/null"; then section "Hyprland Desktop Environment" validate_hyprland_tools validate_hyprland_config - validate_hyprland_plugins - validate_hyprpm_hook validate_hyprland_socket validate_portal_dark_mode elif ssh_cmd "test -f /usr/local/bin/dwm"; then diff --git a/scripts/testing/run-test.sh b/scripts/testing/run-test.sh index d1b4566..c0eaf50 100755 --- a/scripts/testing/run-test.sh +++ b/scripts/testing/run-test.sh @@ -256,7 +256,15 @@ copy_from_vm "/var/log/archsetup-installed-packages.txt" "$TEST_RESULTS_DIR/" "$ capture_post_install_state "$TEST_RESULTS_DIR" # Run comprehensive validation -# This uses the validation.sh library for all checks +# This uses the validation.sh library for all checks. +# +# From here to the end of the script, errexit is disabled on purpose: the +# validation functions are designed to fail-and-count (see VALIDATION_FAILED) +# rather than abort, and the analysis/report-generation steps below can also +# legitimately return non-zero. With `set -e` active, a single failed check +# would kill the run before the test report is written or the VM is cleaned +# up. Pass/fail is signalled explicitly by the exit code at the bottom. +set +e run_all_validations validate_all_services |
