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

Could not find test_runner to run tests? #3707

Open
doronbehar opened this issue Nov 28, 2024 · 4 comments
Open

Could not find test_runner to run tests? #3707

doronbehar opened this issue Nov 28, 2024 · 4 comments
Labels
build-system Related to build system (Cmake)

Comments

@doronbehar
Copy link
Contributor

On NixOS, we experience these errors when trying to run tests:

https://gist.github.com/doronbehar/6a76e09d64a2f515548a53afd72d9663

Any idea why is that?

@djmitche
Copy link
Collaborator

Just to check the obvious, you are building the target test_runner, right? I get the same error if I delete $BUILD/test/test_executable. Similarly with the .py files - those are generated (copied) in the configure stage, so if they are missing then something didn't run.

@djmitche djmitche added the build-system Related to build system (Cmake) label Nov 28, 2024
@doronbehar
Copy link
Contributor Author

OK running make test_runner before running make check helped for the cpp tests, but not for the Python tests (a full build log this time):

https://gist.github.com/doronbehar/6063de9bbeac7ac31ad9dd124c9ba9ab

The question now is, what is the make target that would copy the Python files to the correct place? And why do I have to run make test_runner by myself?

@djmitche
Copy link
Collaborator

Hm, I use the Ninja backend, and there is no check target there:

⸩ cmake --build build -t check
ninja: error: unknown target 'check', did you mean 'calc'?

Even so, the build instructions do specify building test_runner first. I think that's because the ctest binary can't build targets. But as I said earlier, my understanding of CMake is minimal.

For me, just running the configure stage is enough to put the .py files into the build directory:

⸩ rm -rf build
⸩ cmake -DCMAKE_BUILD_TYPE=Debug -S. -Bbuild .
...
⸩ find build/test -name '*.py' | wc -l
131

That the .sh tests succeed, while the .py do not, suggests that the test files exist but their shebang line (#!/usr/bin/env python3) is pointing to something which does not exist.

@doronbehar
Copy link
Contributor Author

Thanks for the link. I too observe the Python files there, and python3 is supposed to be available during that phase. I suspect the issues I'm experiencing now are still related to the cxxbridge related issues. So I'm hoping for a version compatible and comfortable resolution for us in that regard, and then I'll insist further with the Python tests...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-system Related to build system (Cmake)
Projects
Status: Backlog
Development

No branches or pull requests

2 participants