Testing the "Google C++ Testing Framework" on an embedded platform

126 views
Skip to first unread message

Per Magnus Veierland

unread,
Aug 18, 2014, 8:06:23 AM8/18/14
to googletes...@googlegroups.com
Hi,
 
I wish to run the set of units tests created for the "Google C++ Testing Framework" on a custom embedded platform to verify that it has been compiled correctly and that its functionality works properly on the target architecture.
 
As a start, I've built src/gtest_main.cc with test/gtest_all_test.cc using our build system and run the application on our target. All tests passed on the platform.
 
My question is: is running the tests included by test/gtest_all_test.cc a sufficient test of the framework, or is it necessary to use CMake with "make test" as described in the README file? Due to how our build system and platform is configured, this will be signiticantly harder to set up.
 
Sincerely,
Per Magnus Veierland

James Grenning

unread,
Aug 26, 2014, 2:46:08 PM8/26/14
to googletes...@googlegroups.com
It does not look like you got an answer.  Have you tried compiling gtest using your target tools?  I am one of the authors of CppUTest and there are some ports of CppUTest to embedded targets.  In creating CppUTest we specifically stay away from certain C++ features and libraries to make in-target execution more practical.

James

--------------------------------------------------------------------------------------------
James Grenning                  Author of TDD for Embedded C

Ken Turkowski

unread,
Sep 12, 2014, 4:38:31 PM9/12/14
to Per Magnus Veierland, googletes...@googlegroups.com
I am using gtest on Android and a Linux plug computer.
Both have a shell and compilers.
It was easiest for me to start with gtest/make/Makefile, and modify that as needed.
They needed the following:
-DGTEST_HAS_CLONE=0
-DGTEST_USE_OWN_TR1_TUPLE=1
Reply all
Reply to author
Forward
0 new messages