Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't find the test #2

Open
floswald opened this issue Oct 14, 2015 · 4 comments
Open

can't find the test #2

floswald opened this issue Oct 14, 2015 · 4 comments

Comments

@floswald
Copy link

hi,

following the steps you outline i end up with

➜  build git:(master) make test
Running tests...
Test project /Users/florian.oswald/git/gtest-cmake-example/build
    Start 1: that-test-I-made
Could not find executable /Users/florian.oswald/git/gtest-cmake-example/build/runUnitTests
Looked in the following places:
/Users/florian.oswald/git/gtest-cmake-example/build/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/Release/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/Release/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/Debug/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/Debug/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/MinSizeRel/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/MinSizeRel/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/RelWithDebInfo/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/RelWithDebInfo/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/Deployment/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/Deployment/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/Development/runUnitTests
/Users/florian.oswald/git/gtest-cmake-example/build/Development/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/Release/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/Release/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/Debug/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/Debug/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/MinSizeRel/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/MinSizeRel/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/RelWithDebInfo/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/RelWithDebInfo/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/Deployment/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/Deployment/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/Development/runUnitTests
Users/florian.oswald/git/gtest-cmake-example/build/Development/runUnitTests
Unable to find executable: /Users/florian.oswald/git/gtest-cmake-example/build/runUnitTests
1/2 Test #1: that-test-I-made .................***Not Run   0.00 sec
    Start 2: that-other-test-I-made
Could not find executable runUnitTests
Looked in the following places:
runUnitTests
runUnitTests
Release/runUnitTests
Release/runUnitTests
Debug/runUnitTests
Debug/runUnitTests
MinSizeRel/runUnitTests
MinSizeRel/runUnitTests
RelWithDebInfo/runUnitTests
RelWithDebInfo/runUnitTests
Deployment/runUnitTests
Deployment/runUnitTests
Development/runUnitTests
Development/runUnitTests
Unable to find executable: runUnitTests
2/2 Test #2: that-other-test-I-made ...........***Not Run   0.00 sec

0% tests passed, 2 tests failed out of 2

Total Test time (real) =   0.00 sec

The following tests FAILED:
      1 - that-test-I-made (Not Run)
      2 - that-other-test-I-made (Not Run)
Errors while running CTest
make: *** [test] Error 8

any ideas?

@yutakakinjyo
Copy link

@floswald
May be you need to run $ make command before $ make test

@weliveindetail
Copy link
Contributor

Hi Florian, looks like you're on windows using MSVC? I had a similar problem there. The issue was that the runtime library setting for the runUnitTests target doesn't match those of the gtest target. This causes a linker error, so the runUnitTests executable is not built and it cannot be found at runtime.

I just created a pull request that fixes the issue. Hope that helps.

Cheers,
Stefan

@floswald
Copy link
Author

I'm on os Yosemite. Didn't look into this further.
Cheers

On Wednesday, 13 January 2016, Stefan notifications@github.com wrote:

Hi Florian, looks like you're on windows using MSVC? I had a similar
problem there. The issue was that the runtime library setting for the
runUnitTests target doesn't match those of the gtest target. This causes a
linker error, so the runUnitTests executable is not built and it cannot be
found at runtime.

I just created a pull request that fixes the issue. Hope that helps.

Cheers,
Stefan


Reply to this email directly or view it on GitHub
#2 (comment)
.

@tijme
Copy link

tijme commented Feb 13, 2017

Hi @floswald, did you find a fix for this issue? I'm on Sierra and I'm having the same problems.

Fixed this by updating to GoogleTest v1.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants