From 1ac6c5033402ea6756d9be03c1004ec7224eb186 Mon Sep 17 00:00:00 2001 From: Valerii Koval Date: Mon, 29 Jun 2020 20:52:15 +0300 Subject: [PATCH] Update multi-environment test for PIO test command --- tests/commands/test_test.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/tests/commands/test_test.py b/tests/commands/test_test.py index 04a531ed..2b6dc348 100644 --- a/tests/commands/test_test.py +++ b/tests/commands/test_test.py @@ -12,12 +12,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -from os.path import join +import os +import sys import pytest from platformio import util from platformio.commands.test.command import cli as cmd_test +from platformio.compat import WINDOWS def test_local_env(isolated_pio_core): @@ -26,7 +28,7 @@ def test_local_env(isolated_pio_core): "platformio", "test", "-d", - join("examples", "unit-testing", "calculator"), + os.path.join("examples", "unit-testing", "calculator"), "-e", "native", ] @@ -51,24 +53,27 @@ board = teensy31 [env:native] platform = native -[env:espressif32] -platform = espressif32 +[env:espressif8266] +platform = espressif8266 framework = arduino -board = esp32dev +board = nodemcuv2 """ ) project_dir.mkdir("test").join("test_main.cpp").write( """ +#include #ifdef ARDUINO -void setup() {} -void loop() {} +void setup() #else -int main() { +int main() +#endif +{ UNITY_BEGIN(); UNITY_END(); + } -#endif +void loop() {} """ )