PlatformIO Community

Keeping test framework back to previous version

Hi all

Since sunday, we are facing new issue with googletest framework, not building with the build flags we use on our project.
Opened on issue and proposed a PR which fixes it on googletest repo

This is all well and good, but until google merges the PR and releases the patch, our unit tests are stuck.

Or so I thought.
I Just found out that though we cannot directly tell platformio to use an old version of googletest through test_framework = googletest@1.11.0 (which makes platformio unhappy), including lib_deps = googletest@1.11.0 does the trick, for some reason.

Thought I’d publish this here in case someone else ran into a similar issue.

As a side note, this actually downloads both the latest googletest and the kept-back version, which seems a bit weird to me, but hey, it works!

1 Like

Other user on our project reports that this still fails on their machine.

I assume this is due to platformio installing both latest and kept-back versions of googletest, and then something different happens for them during dependency resolution.
Is there a way to explicitly keep back the test framework? Rather than installing the latest and then installing a kept-back library version, which, of course has the potential to mess up the dependency tree.

This is the correct configuration. You can also use more advanced configuration as documented here Custom Unity Library — PlatformIO latest documentation

So, extend GoogletestTestRunner and override it according to your needs.

Yes, please use

lib_deps = googletest@1.11.0