add test_init.py, change for cli gitlab

This commit is contained in:
Aurélien Gauthier 2025-12-10 13:48:30 +01:00
parent ba39b4c849
commit 0a5f9a149b
3 changed files with 23 additions and 5 deletions

View file

@ -19,7 +19,7 @@ pio_build:
before_script:
- pip install -U platformio
- pio lib install "ThrowTheSwitch/Unity@^2.6.0"
# - pio lib install "ThrowTheSwitch/Unity@^2.6.0"
script:
- "pio run -e $ARDUINO_ENV"
@ -32,5 +32,6 @@ pio_test:
- pip install -U platformio
script:
- pio ci --lib='.' --board=$ARDUINO_ENV test/EEPROM_test_struct.cpp
- pio test -e $ARDUINO_ENV --without-upload
# - pio ci --lib='.' --board=$ARDUINO_ENV test/EEPROM_test_struct.cpp
# - "pio ci --lib='.' --board=$ARDUINO_ENV test"

View file

@ -16,7 +16,7 @@ test_framework = unity
;upload_port = /dev/ttyACM0
build_flags =
-std=gnu++17
-I lib/ test/
-I lib/
;-D DEBUG
lib_deps =
northernwidget/DS3231@^1.1.2
@ -24,3 +24,8 @@ lib_deps =
robtillaart/CRC
lib_ldf_mode = deep+
test_lib_deps =
ThrowTheSwitch/Unity@^2.6.0
extra_scripts = pre:test_init.py

12
test_init.py Normal file
View file

@ -0,0 +1,12 @@
# test_init.py
Import("env")
test_env_name = env["PIOENV"]
# Injecte manuellement les chemins d'inclusion nécessaires (Unity et votre config)
env.Append(
CPPPATH=[
"test",
".pio/libdeps/" + test_env_name + "/Unity/src"
]
)