I have had a running googletest unit test running on platformio 4.0.3.
After the upgrade to 4.1 it is not working anymore. I get the following message:
pio test -e native -f native_FSMachine --verbose
Verbose mode can be enabled via `-v, --verbose` option
Collected 5 items
Processing native_FSMachine in native environment
--------------------------------------------------------------------------------------------------------------------------------------------------------
Building...
Verbose mode can be enabled via `-v, --verbose` option
PACKAGES:
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 3 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <FSMachine>
| |-- <Protocol>
| | |-- <Packet>
| |-- <Packet>
|-- <Packet>
Building in release mode
Compiling .pio/build/native/test/native_FSMachine/main.o
test/native_FSMachine/main.cpp:1:10: fatal error: 'gtest/gtest.h' file not found
#include "gtest/gtest.h"
^~~~~~~~~~~~~~~
1 error generated.
*** [.pio/build/native/test/native_FSMachine/main.o] Error 1
the platformio.ini has the following settings for this environment:
Hi @jipp! I’d say that is expected behavior because for some reason only Arduino framework is specified in the library manifest. Try adding lib_compat_mode = off option to your [env:native] and it should work.
you are right with your tip. It works now (tested on windows so far). But I’m not sure how you figured this out. Looking at the history above I see with 4.0.3 it was working with also with lib_compat_mode = soft.
In the manifest I see "frameworks": "arduino".