Hello, I’m using VSC with PlatformIO extension installed running on Windows 11, i’m using a arduino Uno and a Arduino Mega for a project each one with it unique enviroment, i can build and upload code but when i tried the unit testing it gets stuck in the mesage:
Testing...
If you don't see any output for the first 10 secs, please reset board (press reset button)
Things that I already tried:
- Setting a test_port and a port_speed
- Using a extra script to make a delay after the dowload, code below:
import time
Import("env")
if "test" in env.GetBuildType():
env.AddPostAction("upload", lambda *_, **__: time.sleep(2))
- Testing only the uno or the mega, but i get the same result
- Made a code extremely simple as test to make sure it wasn’t it, code below:
#include <unity.h>
#include <unity_config.h>
#include <Arduino.h>
void setUp() {
}
void tearDown() {
}
void test_blink() {
TEST_ASSERT_EQUAL(1, 1);
}
void setup() {
delay(5000);
UNITY_BEGIN();
RUN_TEST(test_blink);
UNITY_END();
}
void loop() {}
I don’t know if it’s gonna help but this is my platformio.ini
[env:mega2560]
platform = atmelavr
board = megaatmega2560
framework = arduino
upload_port = COM6
test_port = COM6
monitor_speed = 9600
test_speed = 9600
test_build_src = false
build_src_filter = +<receiver.cpp>
test_filter = test_env_mega2560
extra_scripts = post:extra_script.py
build_flags = -I test/
lib_deps =
arduino-libraries/SD@^1.3.0
adafruit/Adafruit Fingerprint Sensor Library@^2.1.3
adafruit/Adafruit GFX Library@^1.11.11
prenticedavid/MCUFRIEND_kbv@^3.1.0-Beta
adafruit/Adafruit BusIO@^1.16.2
adafruit/Adafruit TouchScreen@^1.1.5
Wire @ ^1.0
SPI @ ^1.0
SoftwareSerial @ ^1.0
throwtheswitch/Unity@^2.6.0
[env:uno]
platform = atmelavr
board = uno
framework = arduino
upload_port = COM9
test_port = COM9
monitor_speed = 9600
test_speed = 9600
test_build_src = false
build_src_filter = +<transmitter.cpp>
test_filter = test_env_uno
extra_scripts = post:extra_script.py
build_flags = -I test/
lib_deps =
arduino-libraries/SD@^1.3.0
adafruit/Adafruit Fingerprint Sensor Library@^2.1.3
adafruit/Adafruit GFX Library@^1.11.11
prenticedavid/MCUFRIEND_kbv@^3.1.0-Beta
adafruit/Adafruit BusIO@^1.16.2
adafruit/Adafruit TouchScreen@^1.1.5
Wire @ ^1.0
SPI @ ^1.0
SoftwareSerial @ ^1.0
throwtheswitch/Unity@^2.6.0
So i’m completly out of ideas on how to make this work.