1

Build GTEST tests

asked 2016-01-09 22:04:25 -0700

mfinch gravatar image

updated 2016-01-11 11:37:55 -0700

praveenb gravatar image

Attempting to build core tests

I am in directory /Users/Finch/AllJoyngit/core/alljoyn and using command line:

scons OS=darwin CPU=x86 BD=on BINDINGS=cpp SERVICES="about,config,notification,controlpanel" BUILD_SERVICES_SAMPLES=on SDKROOT=$PWD GTEST_DIR=/Users/Finch/GTEST/googletest/include

I get the following error:

scons: Building targets ...
[CXX]     services/about/cpp/unit_test/AboutInterfaceTest.cc
services/about/cpp/unit_test/AboutInterfaceTest.cc:16:10: fatal error: 'gtest/gtest.h' file not found
    #include <gtest/gtest.h>

But gtest/gtest.h is in the GTEST_DIR

Eriks-MacBook-Pro:/ Finch$ ls /Users/Finch/GTEST/googletest/include/gtest/
gtest-death-test.h      gtest-param-test.h.pump gtest-test-part.h       gtest_pred_impl.h
gtest-message.h         gtest-printers.h        gtest-typed-test.h      gtest_prod.h
    gtest-param-test.h      gtest-spi.h             gtest.h

I assume it is operator error, but need help figuring out what I did wrong

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-01-11 11:40:02 -0700

praveenb gravatar image

Set GTEST_DIR as /Users/Finch/GTEST/googletest. No need for trailing include at the end. That is, run:

scons OS=darwin CPU=x86 BD=on BINDINGS=cpp SERVICES="about,config,notification,controlpanel" BUILD_SERVICES_SAMPLES=on SDKROOT=$PWD GTEST_DIR=/Users/Finch/GTEST/googletest
edit flag offensive delete publish link more

Comments

Do I need to add something else to run the tests, or should I create a separate question. If they do run automatically do you want a separate question on where to look for results. I am having difficulty with finding them.

mfinch ( 2016-01-12 13:08:38 -0700 )edit

The scons commands only builds the tests (does not execute them). You should be able to find a sibling directory named 'test' next to the directory named 'dist' if scons succeeds without any errors. In that test directory, you should find binaries named as ajtest and cmtest.

praveenb ( 2016-01-12 13:11:52 -0700 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-01-09 22:04:25 -0700

Seen: 271 times

Last updated: Jan 11 '16