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

moose modules unit testing not occurring #487

Open
WilkAndy opened this issue Jul 23, 2020 · 6 comments
Open

moose modules unit testing not occurring #487

WilkAndy opened this issue Jul 23, 2020 · 6 comments

Comments

@WilkAndy
Copy link

I'm pretty sure i've written a similar idaholab/moose issue in the past few months, but couldn't find it, so sorry for the duplicate if there is one!

CIVET isn't running any of the modules unit tests. For instance:

BUILD_ROOT/moose/modules/geochemistry/unit/: make -j 12
find: '/opt/civet/build_0/moose/modules/geochemistry/unit/include': No such file or directory
Rebuilding symlinks in /opt/civet/build_0/moose/modules/geochemistry/unit/build/header_symlinks
Compiling C++ with suffix (in dbg mode) /opt/civet/build_0/moose/modules/module_loader/src/ModulesApp.C...
Checking if header needs updating: /opt/civet/build_0/moose/modules/geochemistry/unit/include/Geochemistry-unitRevision.h...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemicalDatabaseValidatorTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemistryActivityCoefficientsDebyeHuckelTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemistrySortedIndicesTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemicalSystemTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemicalDatabaseReaderTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/MinimalGeochemicalSystemTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemistryKineticRateCalculatorTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemistrySpeciesSwapperTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/EquilibriumConstantInterpolatorTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemistryIonicStrengthTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemistryFormattedOutputTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemicalSolverTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/GeochemistryActivityCalculatorsTest.C...
Compiling C++ (in dbg mode) /opt/civet/build_0/moose/modules/geochemistry/unit/src/main.C...
Linking Library /opt/civet/build_0/moose/modules/module_loader/lib/libmodule_loader_with_gc-dbg.la...
Linking Library /opt/civet/build_0/moose/modules/geochemistry/unit/test/lib/libgeochemistry-unit_test-dbg.la...
Linking Library /opt/civet/build_0/moose/modules/geochemistry/unit/lib/libgeochemistry-unit-dbg.la...
Linking Executable /opt/civet/build_0/moose/modules/geochemistry/unit/geochemistry-unit-dbg...
BUILD_ROOT/moose/modules/geochemistry/unit/: ./run_tests
[==========] Running 0 tests from 0 test cases.
[==========] 0 tests from 0 test cases ran. (0 ms total)
[  PASSED  ] 0 tests.

and similar for all the other modules. In the geochemistry module there are ~200 tests that really need to be run for every PR.

@brianmoose
Copy link
Contributor

I'm not in the loop anymore but I still get alerted for civet issues, and since I have nothing better to do with my life, I took a look. :)

This doesn't seem to be a civet issue though. Just building the geochemistry unit test executable and running it manually shows that no tests are run. In fact, it appears that the lib/libgeochemistry-unit-opt.so (where all the tests are) is not even linked to the executable (as verified by ldd) even though it definitely is on the link line. This might be due to nothing actually referencing the symbols in libgeochemistry-unit-opt.so so the linker just silently drops it.
Forcing the linkage by, for example, putting a dummy function in one of the unit test source files and calling it from main(), gets the unit tests running again.
So it seems it is a moose build issue and no way am I going to try to figure that out :)

@brianmoose
Copy link
Contributor

By the way, moose/unit is not affected by this because it does reference functions in libmoose-unit-opt.so when main() calls
registerApp(MooseUnitApp). The modules don't have separate unit test apps, so they just call registerApp(<Module>App)

@WilkAndy
Copy link
Author

Thanks for this detective work, @brianmoose . I'm now doing some of my own - will report here if i find anything which is very unlikely since i'm not experienced in this sort of thing.

@WilkAndy
Copy link
Author

I can't replicate what i think you're reporting:

moose/modules/geochemistry/unit/> METHOD=dbg make -j 2
moose/modules/geochemistry/unit/> ./geochemistry-unit-dbg

runs my unit tests

@brianmoose
Copy link
Contributor

What OS are you running? Might just be a linux thing...

@WilkAndy
Copy link
Author

MacOS

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

2 participants