#!/usr/bin/env bash # Created by John A. Hoeven with the ethical assistance of Claude AI # --------------------------------------------------------------------------- # test_basic.sh # ~/projects/ceos/alpine-installer/tests/test_basic.sh # Version: v0.0.1 | Status: DEVELOPMENT # Target: Alpine Linux x86-64 (tinkerpad / ThinkPad T480) # --------------------------------------------------------------------------- # Re-runnable test suite for Tier 2 (Basic). Run after ce-basic.sh. # Exits with count of failures (0 = all passed). # --------------------------------------------------------------------------- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" SCRIPT_NAME="test_basic" source "${SCRIPT_DIR}/lib/ce-common.sh" || { echo "ERROR: ce-common.sh not found"; exit 1; } PASS=0 FAIL=0 check() { local desc="${1}" cmd="${2}" if eval "${cmd}" >/dev/null 2>&1; then log_info "PASS: ${desc}" ((PASS++)) else log_warn "FAIL: ${desc}" ((FAIL++)) fi } log_info "=== TEST SUITE: TIER 2 BASIC ===" # Comms additions check "abook present" 'command -v abook' check "task present" 'command -v task' # Monitoring check "nethogs present" 'command -v nethogs' check "ip present" 'command -v ip' # GUI check "cagebreak present" 'command -v cagebreak' check "firefox present" 'command -v firefox' check "xwayland present" 'command -v Xwayland' # Media check "cmus present" 'command -v cmus' check "mpv present" 'command -v mpv' check "ffmpeg present" 'command -v ffmpeg' check "convert present" 'command -v convert' check "fbi present" 'command -v fbi' # Fonts check "figlet present" 'command -v figlet' # Utilities check "tldr present" 'command -v tldr' check "restic present" 'command -v restic' check "jq present" 'command -v jq' check "bc present" 'command -v bc' check "zip present" 'command -v zip' check "unzip present" 'command -v unzip' check "xz present" 'command -v xz' log_info "=== RESULTS: ${PASS} passed, ${FAIL} failed ===" [[ "${FAIL}" -eq 0 ]] \ && log_info "All Tier 2 tests passed." \ || log_warn "${FAIL} test(s) failed — review ${LOG_FILE}" exit "${FAIL}"