Hello
I’m walking through Unit Testing. Separated my test code into two division : embedded and native. as demonstrated in docs and examples.
Embedded-based test ran successfully, but I face now an issue when running a test in native environment : g++ isn’t recognized.
PS C:\Users\Hamza\Documents\PlatformIO\Projects\Testss> pio test -e native
Verbose mode can be enabled via `-v, --verbose` option
Collected 2 items
Processing test-native in native environment
------------------------------------------------------------------------------------------------------------------------------------------------------
Building...
'g++' is not recognized as an internal or external command,
operable program or batch file.
'g++' is not recognized as an internal or external command,
operable program or batch file.
'g++' is not recognized as an internal or external command,
operable program or batch file.
*** [.pio\build\native\test\output_export.o] Error 1
*** [.pio\build\native\test\test-native\test.o] Error 1
*** [.pio\build\native\lib800\calculator\Calculator.o] Error 1
'gcc' is not recognized as an internal or external command,
operable program or batch file.
*** [.pio\build\native\UnityTestLib\unity.o] Error 1
============================================================= [FAILED] Took 4.08 seconds =============================================================
Test Environment Status Duration
------------- ------------- -------- ------------
test-embedded nodemcuv2 IGNORED
test-embedded native IGNORED
test-native nodemcuv2 IGNORED
test-native native FAILED 00:00:04.083
======================================================= 1 failed, 0 succeeded in 00:00:04.083 =======================================================
I’ve added MinGW/bin folder (that contains g++.exe) into PATH.
It’s now recognized at Windows cmd.
But still not recognized in VSCode / PIO.
Testing g++ commands in VSCode Terminal :
Tried running VSCode as Administrator. Didn’t work for me.
What I’ve missed ?