mirror of
https://github.com/alexhopeoconnor/arduino-home-assistant.git
synced 2026-10-04 02:48:13 +10:00
70 lines
2.0 KiB
INI
70 lines
2.0 KiB
INI
; PlatformIO — Unity tests for home-assistant-integration (ArduinoHA)
|
|
;
|
|
; Full suite:
|
|
; pio test -e esp8266
|
|
; pio test -e esp32
|
|
;
|
|
; Single suite (examples):
|
|
; pio test -e esp8266 --filter test_utils_serializers
|
|
; pio test -e esp8266 --filter test_mqtt_core
|
|
; pio test -e esp8266 --filter test_entities_basic
|
|
; pio test -e esp8266 --filter test_entities_numeric
|
|
; pio test -e esp8266 --filter test_entities_extended
|
|
; pio test -e esp8266 --filter test_entities_misc
|
|
;
|
|
; See: https://docs.platformio.org/en/latest/advanced/unit-testing/structure/hierarchy.html
|
|
|
|
[platformio]
|
|
default_envs = esp8266
|
|
|
|
[common]
|
|
framework = arduino
|
|
test_framework = unity
|
|
test_build_src = yes
|
|
monitor_speed = 115200
|
|
build_flags = -DARDUINOHA_TEST
|
|
lib_deps = knolleary/PubSubClient@2.8.0
|
|
|
|
[env:esp8266]
|
|
extends = common
|
|
test_ignore = test_native_core
|
|
platform = espressif8266
|
|
board = d1_mini
|
|
|
|
[env:esp32]
|
|
extends = common
|
|
test_ignore = test_native_core
|
|
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.05/platform-espressif32.zip
|
|
board = esp32dev
|
|
build_unflags = -std=gnu++11
|
|
build_flags = ${common.build_flags} -std=gnu++14
|
|
|
|
; Host-only regression checks for serialization, topic validation, and the
|
|
; PubSubClient mock path. The Arduino compatibility files live exclusively
|
|
; under test/native and are never included in firmware environments.
|
|
[env:native]
|
|
platform = native
|
|
test_framework = unity
|
|
test_build_src = yes
|
|
lib_deps = throwtheswitch/Unity@^2.6.1
|
|
build_flags =
|
|
-DARDUINOHA_TEST
|
|
-Itest/native/include
|
|
-fsanitize=address,undefined
|
|
-fno-omit-frame-pointer
|
|
build_src_filter =
|
|
-<*>
|
|
+<ArduinoHALog.cpp>
|
|
+<HADevice.cpp>
|
|
+<HAMqtt.cpp>
|
|
+<device-types/HABaseDeviceType.cpp>
|
|
+<device-types/HAText.cpp>
|
|
+<mocks/PubSubClientMock.cpp>
|
|
+<utils/HAAvailabilityConfig.cpp>
|
|
+<utils/HADictionary.cpp>
|
|
+<utils/HAJson.cpp>
|
|
+<utils/HANumeric.cpp>
|
|
+<utils/HASerializer.cpp>
|
|
+<utils/HASerializerArray.cpp>
|
|
+<utils/HAUtils.cpp>
|