60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
# docker-compose configuration for the hardware variant.
|
|
#
|
|
# Usage (from repository root):
|
|
#
|
|
# # One-time: stage the Melexis packages alongside this file.
|
|
# # See docs/20_docker_image.md §5.
|
|
# tar -czf melexis-pkgs.tar.gz \
|
|
# -C "/path/to/Melexis/site-packages" \
|
|
# pylin pymumclient pylinframe
|
|
#
|
|
# # Build
|
|
# docker compose -f docker/compose.hw.yml build
|
|
#
|
|
# # Run hardware suite once and exit
|
|
# docker compose -f docker/compose.hw.yml up --abort-on-container-exit
|
|
#
|
|
# Adjust /dev/ttyUSB0 to whatever the Owon PSU enumerates as on the host.
|
|
|
|
services:
|
|
ecu-tests:
|
|
image: ecu-tests:hw
|
|
build:
|
|
context: .. # build context = repo root
|
|
dockerfile: docker/Dockerfile
|
|
args:
|
|
INCLUDE_MELEXIS: "1"
|
|
secrets:
|
|
- melexis_tarball
|
|
|
|
# MUM at 192.168.7.2 is exposed by the host's USB-RNDIS interface.
|
|
# Bridge networking would hide it; host mode shares the namespace.
|
|
network_mode: host
|
|
|
|
# Owon PSU passthrough. List every USB-serial adapter the bench
|
|
# uses here; the framework's resolver will pick the right one.
|
|
devices:
|
|
- "/dev/ttyUSB0:/dev/ttyUSB0"
|
|
|
|
# The container user (uid 1000, 'tester') must be in the host
|
|
# group that owns the serial device — typically 'dialout' on
|
|
# Debian-style systems.
|
|
group_add:
|
|
- dialout
|
|
|
|
volumes:
|
|
- ../reports:/reports # report outputs
|
|
- ../config/test_config.yaml:/workspace/config/test_config.yaml:ro # bench config (read-only)
|
|
|
|
environment:
|
|
ECU_TESTS_CONFIG: /workspace/config/test_config.yaml
|
|
|
|
command: >
|
|
pytest -m "hardware and mum and not slow" -v
|
|
--junitxml=/reports/junit.xml
|
|
--html=/reports/report.html --self-contained-html
|
|
|
|
secrets:
|
|
melexis_tarball:
|
|
file: ../melexis-pkgs.tar.gz
|