This repository was archived by the owner on Feb 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-arm-dwsim.sh
More file actions
60 lines (49 loc) · 1.69 KB
/
test-arm-dwsim.sh
File metadata and controls
60 lines (49 loc) · 1.69 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# Script to test DWSIM on ARM64 architecture using Docker
# This script builds and runs the ARM64 container to test DWSIM headless features
set -e
echo "=========================================="
echo "DWSIM ARM64 Compatibility Test"
echo "=========================================="
echo ""
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo -e "${RED}Error: Docker is not installed${NC}"
exit 1
fi
# Check if Docker buildx is available for multi-platform builds
if ! docker buildx version &> /dev/null; then
echo -e "${YELLOW}Warning: Docker buildx not available. Installing...${NC}"
docker buildx create --use
fi
echo -e "${GREEN}Step 1: Setting up QEMU for ARM64 emulation${NC}"
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
echo ""
echo -e "${GREEN}Step 2: Building ARM64 Docker image${NC}"
echo "This may take several minutes..."
docker buildx build \
--platform linux/arm64 \
-f Dockerfile.arm-test \
-t enerflow-dwsim-arm-test:latest \
--load \
.
echo ""
echo -e "${GREEN}Step 3: Running Test05_FlashAlgorithmComparison on ARM64${NC}"
echo "=========================================="
# Create TestResults directory if it doesn't exist
mkdir -p TestResults
# Run the container
docker run --rm \
--platform linux/arm64 \
-v "$(pwd)/TestResults:/app/TestResults" \
enerflow-dwsim-arm-test:latest
echo ""
echo "=========================================="
echo -e "${GREEN}Test completed!${NC}"
echo "Check TestResults/ directory for detailed logs"
echo "=========================================="