I’m very new to unit testing. I have unit testing working on an embedded device. I can test my classes appropriately for various conditions…
However, my use case involves networking between arduinos using PJON (GitHub - gioblu/PJON: PJON (Padded Jittering Operative Network) is an experimental, arduino-compatible, multi-master, multi-media network protocol.) which works well… but I have a whole bunch of layers that I’d like to test which involves sending and updating values between arduinos.
My current project has several of these ENV
with build src filters for each arduino.
[env:mega_A_LEDS]
platform = atmelavr
board = ATmega328P
framework = arduino
upload_port = /dev/ttyUSB4
monitor_port = /dev/ttyUSB4
test_port = /dev/ttyUSB4
monitor_speed = 115200
build_src_filter = +<./${PIOENV}/*.cpp> +<./${PIOENV}/*.h>
build_flags =
${env.build_flags}
-D PJON_INCLUDE_SWBB
-D PJON_ID=5
-D PJON_PIN=2
-D PJON_WAKE=3
-D LED1_PIN=14
-D LED2_PIN=15
-D LED3_PIN=16
-D ENABLE_LEDS=4
-std=gnu++11
lib_deps =
${env.lib_deps}
build_unflags =
-Wregister
-std=gnu++17
Ideally I need the test to build
two binaries and upload them to different arduinos… say A and B… and the test to involve sending a message from A to B…