prole/tests/final_comprehensive_test.sh
chrisfu fff18fdbe4 Update Prole-DB and improve Supabase integration
- Bumped Prole-DB image version to 17.7-053 in scripts, Dockerfile, and manifests.
- Replaced `prole-scan` with `prole-agent` throughout scripts and tests.
- Refined Kubernetes setup for Supabase to use namespace 'supabase'.
- Introduced conversion of Supabase Docker Compose to Kubernetes manifests with `kompose`.
- Added support for Kerberos toggle via environment variables in `init_kerberos.sh`.
- Improved error handling and logging in scripts for better maintainability.
2026-02-01 23:56:25 -08:00

96 lines
2.8 KiB
Bash
Executable File

#!/bin/bash
echo "=========================================="
echo " Prole Installer - Final Verification"
echo "=========================================="
echo ""
# Test suite
TESTS_PASSED=0
TESTS_TOTAL=0
run_test() {
TESTS_TOTAL=$((TESTS_TOTAL + 1))
echo -n "[$TESTS_TOTAL] $1... "
shift
if "$@" > /dev/null 2>&1; then
echo "✓"
TESTS_PASSED=$((TESTS_PASSED + 1))
return 0
else
echo "✗"
return 1
fi
}
# Core functionality tests
run_test "Install.py imports" python3 -c "from install import ProleController, get_resource_path"
run_test "Ncurses modules" python3 -c "from installer.ncurses_installer import run_ncurses_installer"
run_test "Command-line interface" python3 install.py --help
run_test "Makefile" make help
# Resource tests
run_test "Image resources" python3 -c "
from pathlib import Path
import sys
sys.path.insert(0, str(Path.cwd()))
from install import get_resource_path
for img in ['img/proleIcon.png', 'img/proleLogo.png', 'img/proleLogoSepia.png']:
if not get_resource_path(img).exists():
sys.exit(1)
"
run_test "Binary executable" test -x prole-net/prole-agent
run_test "App bundle" test -d "prole-app/dist/Prole Tools.app"
# Build system tests
run_test "Spec generator" python3 scripts/generate_spec.py
run_test "Icon conversion" make build/prole.icns
# Verify spec includes everything
echo -n "[$((TESTS_TOTAL + 1))] Spec includes all resources... "
TESTS_TOTAL=$((TESTS_TOTAL + 1))
if grep -q "prole-app/dist/Prole Tools.app" installer.spec && \
grep -q "prole-net/prole-agent" installer.spec && \
grep -q "img.*img" installer.spec; then
echo "✓"
TESTS_PASSED=$((TESTS_PASSED + 1))
else
echo "✗"
fi
# Summary
echo ""
echo "=========================================="
echo " Test Results: $TESTS_PASSED/$TESTS_TOTAL passed"
echo "=========================================="
echo ""
if [ $TESTS_PASSED -eq $TESTS_TOTAL ]; then
echo "✓ All tests passed!"
echo ""
echo "Features ready:"
echo " ✓ Ncurses terminal interface"
echo " ✓ Automatic display detection"
echo " ✓ Image resources embedded"
echo " ✓ Binary executables embedded (prole-agent)"
echo " ✓ App bundles embedded (Prole Tools.app)"
echo " ✓ Build system configured"
echo ""
echo "Embedded resources:"
echo " • Images: ~11 MB"
echo " • prole-agent: 6.8 MB (universal)"
echo " • Prole Tools.app: ~12 MB"
echo " • Expected final size: ~50-100 MB"
echo ""
echo "Next steps:"
echo " 1. Build: make package"
echo " 2. Test: ./dist/Prole\\ Installer.app/Contents/MacOS/prole-installer"
echo " 3. Install: cp -r 'dist/Prole Installer.app' /Applications/"
echo ""
exit 0
else
echo "✗ Some tests failed"
exit 1
fi