-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_all_tests_docker.sh
More file actions
executable file
·45 lines (37 loc) · 1.68 KB
/
run_all_tests_docker.sh
File metadata and controls
executable file
·45 lines (37 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# iolinki Unified Docker Test Runner
set -e
echo "============================================"
echo "🐳 iolinki Docker-based Validation Suite"
echo "============================================"
# 1. Linux Host Tests
echo -e "\n[1/2] 🐧 Running Linux Host Tests..."
if [[ "$(docker images -q iolinki-test 2> /dev/null)" == "" ]]; then
echo " ⚠️ Test image not found. Building..."
docker build -f Dockerfile.test -t iolinki-test .
else
echo " ✅ Test image found. Reusing cached image."
fi
docker run --rm -v "$(pwd)":/workspace iolinki-test bash -c "./check_quality.sh && bash /workspace/.docker_test_entrypoint.sh"
# 2. Zephyr Simulation Tests
echo -e "\n[2/2] 🪁 Running Zephyr Simulation Tests..."
# Check if Zephyr base image exists
if [[ "$(docker images -q iolinki-zephyr-base 2> /dev/null)" == "" ]]; then
echo " ⚠️ Zephyr base image not found. Building (this will download ~5GB, first time only)..."
docker build -f Dockerfile.zephyr-base -t iolinki-zephyr-base .
else
echo " ✅ Zephyr base image found. Skipping heavy download."
fi
if [[ "$(docker images -q iolinki-zephyr-test 2> /dev/null)" == "" ]]; then
echo " 🔨 Building test image..."
docker build -f Dockerfile.zephyr -t iolinki-zephyr-test .
else
echo " ✅ Zephyr test image found. Reusing cached image."
fi
echo " 🏃 Running Zephyr tests..."
docker run --rm -v "$(pwd)":/workdir/modules/lib/iolinki iolinki-zephyr-test
echo -e "\n============================================"
echo "✅ All Dockerized Tests Completed Successfully"
echo "============================================"
# Final Cleanup (optional but good for runners)
# docker system prune -f