databuild/tests/end_to_end/validate_runner.sh
soaxelbrooke bfec05e065
Some checks are pending
/ setup (push) Waiting to run
Big change
2025-07-13 21:18:15 -07:00

54 lines
No EOL
1.5 KiB
Bash
Executable file

#!/bin/bash
# Simple validation test for the E2E test runner
set -euo pipefail
echo "[INFO] Validating E2E test runner setup"
# Check if the test runner exists
# Find the runner relative to the workspace root
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
WORKSPACE_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
RUNNER_PATH="$WORKSPACE_ROOT/run_e2e_tests.sh"
if [[ ! -f "$RUNNER_PATH" ]]; then
echo "[ERROR] E2E test runner not found at: $RUNNER_PATH"
exit 1
fi
# Check if it's executable
if [[ ! -x "$RUNNER_PATH" ]]; then
echo "[ERROR] E2E test runner is not executable: $RUNNER_PATH"
exit 1
fi
# Check if test scripts exist
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
REQUIRED_SCRIPTS=(
"$SCRIPT_DIR/simple_test.sh"
"$SCRIPT_DIR/basic_graph_test.sh"
"$SCRIPT_DIR/podcast_reviews_test.sh"
"$SCRIPT_DIR/lib/test_utils.sh"
"$SCRIPT_DIR/lib/db_utils.sh"
"$SCRIPT_DIR/lib/service_utils.sh"
)
for script in "${REQUIRED_SCRIPTS[@]}"; do
if [[ ! -f "$script" ]]; then
echo "[ERROR] Required test script not found: $script"
exit 1
fi
done
echo "[INFO] ✅ All E2E test files are present and accessible"
echo "[INFO] ✅ E2E test runner is executable"
echo "[INFO] "
echo "[INFO] To run the actual end-to-end tests, execute:"
echo "[INFO] ./run_e2e_tests.sh"
echo "[INFO] "
echo "[INFO] This will:"
echo "[INFO] - Build required targets in example directories"
echo "[INFO] - Run CLI and Service build tests"
echo "[INFO] - Validate build event logging"
echo "[INFO] - Test API functionality"
exit 0