Skip to content

ci: test: Add integration test using z-wave-stack-binaries #85

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
Apr 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,6 @@ jobs:
$ZPC_COMMAND --version
docker-compose pull
export ZPC_COMMAND="docker-compose up --abort-on-container-exit"
cd z-wave-stack-binaries/bin && file -E *_x86_REALTIME.elf
cd z-wave-stack-binaries/bin && file -E *_x86_REALTIME.elf && cd -
export ZPC_ARGS="--log.level=d"
debug=1 ./scripts/tests/z-wave-stack-binaries-test.sh
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ services:
zpc:
image: z-wave-protocol-controller
build: .
command: run --mqtt.host=broker --zpc.serial="${ZPC_DEVICE:-/dev/ttyACM0}" ${ZPC_ARGS}
command: run --mqtt.host=broker --zpc.serial="${ZPC_DEVICE:-/dev/ttyACM0}" ${ZPC_ARGS:--}
volumes:
- /dev/pts:/dev/pts
devices:
- ${ZPC_DEVICE:-/dev/ttyACM0}:/dev/ttyUSB0
depends_on:
- broker
broker:
condition: service_started
environment:
ZPC_ARGS: "--"
17 changes: 16 additions & 1 deletion helper.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ packages+=git-lfs unp time file usbutils bsdutils
packages+=nlohmann-json3-dev
# TODO: remove for offline build
packages+=curl wget python3-pip
packages+=time
packages+=expect

# For docs
packages+=graphviz
Expand Down Expand Up @@ -243,6 +243,21 @@ test: ${build_dir}

check: test

mapdir?=applications/zpc/components/dotdot_mapper/rules
datastore_file?=tmp.db
cache_path?=tmp/cache/ota
devel/integration/test: ./scripts/tests/z-wave-stack-binaries-test.sh
-reset
rm -fv ${datastore_file} *.tmp
mkdir -p ${cache_path}
-pidof mosquitto
ZPC_COMMAND="${run_file} \
--mapdir=${mapdir} \
--zpc.datastore_file=${datastore_file} \
--zpc.ota.cache_path=${cache_path} \
--log.level=d" \
time $< # Add debug=1 to begining of this line to trace

dist/cmake: ${build_dir}
cmake --build $< --target package
cmake --build $< --target package_archive
Expand Down
Loading
Loading