I am trying to use GoogleTest
and bullseye
for testing C application code. I am in a Red Hat Linux environment using an i686-type processor. I got the gtest
and bullseye
libraries. The process for writing stubs and test code is also understandable. The step where I'm facing issues is making changes in the makefile
to get the binary and coverage file.
I went through the official documentation available for gtest
and bullseye
, but I'm not able to quite grasp the process.
If anybody has experienced the same situation and finally got the walk-through, please share with me. It'll be very helpful.
For googleTest, just add library and include path, add -I${GTEST_DIR}/include -L${GTEST_DIR}/lib/.libs/libgtest.a
when doing gcc compiling.
Or if you are using automake to generate of Makefile, add two lines to Makefile.am
which can be used by automake also works.
autotest_LDADD=@LIBS@ ${GTEST_DIR}/lib/.libs/libgtest.a
autotest_CXXFLAGS=@CXXFLAGS@ -I${GTEST_DIR}/include
The project name is autotest, and ${GTEST_DIR} should be a environment variable before you compile.
Never used bullseye, but it should be close to this.