mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
add target native-test-create
This commit is contained in:
@@ -214,23 +214,20 @@ lib_ldf_mode = off
|
||||
lib_deps =
|
||||
|
||||
; unit tests
|
||||
; The code is in ./test/test_api.*
|
||||
; The test code is in ./test/test_api.cpp and the test_api.h file is created by the native-test-create environment.
|
||||
; to run use `platformio run -e native-test -t exec`. All tests should PASS.
|
||||
; to update the test results, compile with -DEMSESP_UNITY_CREATE by uncommenting the line below
|
||||
; then re-run and capture the output between "START - CUT HERE" and "END - CUT HERE" into the test_api.h file
|
||||
; tip: use https://jsondiff.com/ to compare the expected and actual responses.
|
||||
[env:native-test]
|
||||
platform = native
|
||||
test_build_src = true
|
||||
build_flags =
|
||||
; -DEMSESP_UNITY_CREATE
|
||||
-DARDUINOJSON_ENABLE_ARDUINO_STRING=1
|
||||
-DEMSESP_STANDALONE -DEMSESP_TEST
|
||||
-DEMSESP_UNITY
|
||||
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.7.3-dev.0\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
||||
-std=gnu++17 -Og -ggdb
|
||||
build_type = debug
|
||||
build_src_flags =
|
||||
-DEMSESP_STANDALONE -DEMSESP_TEST
|
||||
-DEMSESP_UNITY
|
||||
-DARDUINOJSON_ENABLE_ARDUINO_STRING=1
|
||||
-DEMSESP_DEFAULT_LOCALE=\"en\" -DEMSESP_DEFAULT_TX_MODE=8 -DEMSESP_DEFAULT_VERSION=\"3.7.3-dev.0\" -DEMSESP_DEFAULT_BOARD_PROFILE=\"S32\"
|
||||
-std=gnu++17 -Og -ggdb
|
||||
-Wall -Wextra
|
||||
-Wno-unused-parameter -Wno-sign-compare -Wno-missing-braces
|
||||
-Wno-vla-cxx-extension -Wno-tautological-constant-out-of-range-compare
|
||||
@@ -260,6 +257,12 @@ lib_deps = Unity
|
||||
test_testing_command =
|
||||
${platformio.build_dir}/${this.__env__}/program
|
||||
|
||||
; builds the test cases and creates the test_api.h file
|
||||
; run with `pio run -e native-test-create -t exec` and capture the output between "START - CUT HERE" and "END - CUT HERE" and paste it into the test_api.h file
|
||||
[env:native-test-create]
|
||||
extends = env:native-test
|
||||
build_flags =
|
||||
-DEMSESP_UNITY_CREATE
|
||||
;
|
||||
; Building and testing locally on OS, which we call "standalone" without an ESP32.
|
||||
; See https://docs.platformio.org/en/latest/platforms/native.html
|
||||
|
||||
Reference in New Issue
Block a user