diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2ca19e..b220146 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 ci --lib='.' --board=$ARDUINO_ENV test" \ No newline at end of file + - 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" \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index ec2dbdd..c93a17c 100755 --- a/platformio.ini +++ b/platformio.ini @@ -16,11 +16,16 @@ 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 arduino-libraries/Ethernet robtillaart/CRC -lib_ldf_mode = deep+ \ No newline at end of file +lib_ldf_mode = deep+ + +test_lib_deps = + ThrowTheSwitch/Unity@^2.6.0 + +extra_scripts = pre:test_init.py \ No newline at end of file diff --git a/test_init.py b/test_init.py new file mode 100644 index 0000000..d6788d8 --- /dev/null +++ b/test_init.py @@ -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" + ] +) \ No newline at end of file