.
Some checks failed
dropshell-build / build (push) Failing after 6s

This commit is contained in:
j842
2025-06-10 11:12:28 +12:00
parent 1fce6fc0b4
commit 222ed229ef
15 changed files with 121 additions and 6 deletions

30
test.sh
View File

@ -4,9 +4,33 @@ set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
echo "Testing"
echo "Building and testing test_libs..."
[ -f "${SCRIPT_DIR}/output/ipdemo" ] || { echo "ipdemo binary not found"; exit 1; }
# Build test_libs
docker run --rm \
-v "${SCRIPT_DIR}/tests:/tests" \
-v "${SCRIPT_DIR}/output:/output" \
-w /tests/test_libs \
gitea.jde.nz/public/dropshell-build-base:latest \
sh -c "mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make && cp test_libs /output/"
"${SCRIPT_DIR}/output/ipdemo" || echo "Success!"
# Run test_libs
if [ -f "${SCRIPT_DIR}/output/test_libs" ]; then
echo "Running test_libs..."
"${SCRIPT_DIR}/output/test_libs"
echo "test_libs completed successfully!"
else
echo "test_libs binary not found"
exit 1
fi
echo ""
echo "Testing ipdemo..."
# Check if ipdemo exists
if [ -f "${SCRIPT_DIR}/output/ipdemo" ]; then
echo "Running ipdemo..."
"${SCRIPT_DIR}/output/ipdemo" || echo "ipdemo test completed!"
else
echo "ipdemo binary not found - run ./build.sh first"
fi