-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 1.09 KB
/
Makefile
File metadata and controls
39 lines (30 loc) · 1.09 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
.PHONY: up down logs status test clean distclean help
all: up
up:
./run.sh
down:
docker compose down
logs:
docker compose logs -f
status:
./test.sh
# Run unit tests in a throwaway Docker image. The image is built with a
# unique tag, run, and removed afterwards (--rm + rmi) so nothing lingers
# on the host. MT5 SDK is mocked — these tests cover pure logic only.
test:
@TAG=mt5-httpapi-tests:$$(date +%s)-$$RANDOM; \
docker build -f Dockerfile.test -t $$TAG . && \
(docker run --rm $$TAG; STATUS=$$?; docker rmi -f $$TAG >/dev/null; exit $$STATUS)
clean: down
sudo rm -rf data/storage data/shared data/metatrader5 data/oem run.log
distclean: clean
rm -f data/win.iso
help:
@echo "Available targets:"
@echo " up - Start the Windows VM with MT5 (downloads ISO if needed)"
@echo " down - Stop the VM"
@echo " logs - Follow container logs"
@echo " status - Check VM and MT5 HTTP API status"
@echo " test - Run unit tests in a throwaway Docker image"
@echo " clean - Remove VM disk and state (keeps ISO)"
@echo " distclean - Remove everything including ISO"