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

No output from unit test #779

Closed
ubrenaf opened this issue Jun 19, 2021 · 6 comments
Closed

No output from unit test #779

ubrenaf opened this issue Jun 19, 2021 · 6 comments

Comments

@ubrenaf
Copy link

ubrenaf commented Jun 19, 2021

Hello, I have compiled openfast via mingw on windows 10 and want to check if it works. But when running the unit tests in each module (openfast/build/unit_tests/module), for example beamdyn_utest, either by start beamdyn_utest.exe or just clicking, there is no output / results shown. According to the documentation I should get some feedback so I'm not sure what's wrong or if I missed something?

My build process was downloading using git clone --single-branch --branch dev --recursive https:/... and compiled with cmake .. -G "MinGW Makefiles" -DBUILD_TESTING=ON and then mingw32-make. I've tried recompiling the test separately by make beamdyn_utest but this had no effect. I don't see any errors when configuring, compiling or running either openfast.exe or the tests exe's.

@ubrenaf
Copy link
Author

ubrenaf commented Jun 20, 2021

This resolved itself when using cmake option -DBUILD_FASTFARM=ON and make FAST.Farm. I was then able to run the tests. I assume the tests in dev only work for FAST.farm.

@andrew-platt
Copy link
Collaborator

andrew-platt commented Jun 21, 2021

I think you may have been executing the test incorrectly. From a terminal window, the beamdyn_utest should be executed using ctest beamdyn_utest from the build directory. Double clicking on it would have no effect.

The -DBUILD_FASTFARM=ON option should not affect the BeamDyn unit test in any way. @rafmudaf, is it possible we have a logic error in the setup someplace?

@rafmudaf
Copy link
Collaborator

rafmudaf commented Jun 21, 2021

It's possible something was changed with FAST Farm, but I would expect this to show up in GitHub Actions. The regression-tests-release pipeline runs the BeamDyn unit tests with FAST Farm not enabled (https://github.com/OpenFAST/openfast/blob/dev/.github/workflows/automated-dev-tests.yml#L66).

@ubrenaf
Copy link
Author

ubrenaf commented Jun 23, 2021

Yes I see now that you are right @andrew-platt, ctest can also run the unit tests. I think I just assumed otherwise since ctest was not mentioned in the unit test chapter (3.2.1) in the documentation. And yes, -DBUILD_FASTFARM has no effect.

But the unit tests can also be run individually directly through the executables. My very simple error was that either double clicking the .exe, or writing start beamdyn_utest.exe, in Windows both open a new command prompt which immediately closes upon completion. Instead you should write only /path/to/beamdyn_utest.exe. Or indeed ctest beamdyn_utest from build.

@rafmudaf
Copy link
Collaborator

I'm reopening this issue to keep alive to suggestion for improving unit test documentation. Thanks @ubrenaf for pointing this out.

@rafmudaf
Copy link
Collaborator

I've moved the test-specific documentation up a level in the table of contents so that its not so hidden.

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

No branches or pull requests

3 participants