#!/bin/bash # Test DEB package installation in Debian/Ubuntu container set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$(dirname "$(dirname "$SCRIPT_DIR")")" BUILD_DIR="${PROJECT_ROOT}/build/deb" echo "==========================================" echo " Testing DEB Package Installation" echo "==========================================" # Find the DEB package DEB_PACKAGE=$(ls -1 "${BUILD_DIR}"/*.deb 2>/dev/null | head -1) if [ -z "$DEB_PACKAGE" ]; then echo "Error: No .deb package found in ${BUILD_DIR}" echo "Run 'make package-deb' first" exit 1 fi echo "Found package: ${DEB_PACKAGE}" # Test installation directly in Debian container echo "" echo "Running installation tests in Debian container..." docker run --rm \ -v "${BUILD_DIR}:/packages:ro" \ debian:latest \ sh -c "apt-get update && apt-get install -y /packages/*.deb && echo 'DEB installation successful'" echo "" echo "==========================================" echo " DEB Package Test Complete" echo "=========================================="