PlatformIO Community

Gtest not working on pio 4.1

Hi

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:

[env:native]
platform = native
lib_deps =
  googletest@1.8.1
lib_ignore =
  NetworkClient
build_flags =
  -std=c++11
lib_archive = false
test_ignore = embedded*

any idea how to fix?

any help appreciated.
cheers

Could you provide a simple project to reproduce this issue?

Hi

sure:


created with pio 4.1
just run: pio test

Hi

not sure what is the diff in checking for includes and libs between 4.0.3 and 4.1.

thx