Closed brianmoose closed 3 years ago
@brianmoose ?! Can I assign this to you? :laughing: Hope you're doing well man!
Hey @lindsayad ! Things are going well!
I have no plans on working on this, just thought I would put it over here so that it gets some attention.
Adding all the boilerplate <Module>UnitApp
code should be pretty straight forward if that is the preferred solution.
Also, somebody who runs linux and is more in tune with moose development should verify. I might have just gone crazy! :smile:
Will get around to this once testing is back. Had a fix for it, just never got around to it.
Cool, sounds good, thank @loganharbour
a
I believe this is now fixed, thanks heaps! If you agree, you can close, @loganharbour
Still doesn't look like any module unit tests are getting run (or found). here is the latest "Modules Debug" on the next
branch, all the modules have zero unit tests found.
OK, that's a bummer. I was looking in a PR and they were getting run during that process. Eg, have a look at https://civet.inl.gov/job/633127/
Looks like your working job is using CentOS, my not working job is using Ubuntu 16. That seems to agree with #16092
@brianmoose just let us know when you want your job back :smile:
I've been playing around with recipes a lot today moving things to the new build machines.
Recipes just updated and Modules debug
looks good now: https://civet.inl.gov/job/633406/
Seems like that build config that @brianmoose is borked for cppunit, but... gonna ignore that as we're shifting everything to CentOS 8 on the new build machines now, and the recipe I just linked is in production on next.
Glad you figured it out! I wouldn't have looked at cppunit since the modules seem to be using GoogleTest, not sure how cppunit and GoogleTest interact with each other, but as long as it works!
Closing per the recipe https://civet.inl.gov/job/633917/
Bug Description
Originally reported by @WilkAndy on the Civet repo but it isn't a Civet problem so I am moving it over here. None of the modules unit tests are being run, example. To be clear, there is an attempt at being run but they all report 0 tests.
Steps to Reproduce
@WilkAndy reports that it works fine on MacOS so this seems to be a linux issue.
To reproduce on linux, in dbg mode, build any of the module unit test executables and run it, for example
modules/geochemistry/unit
. It reports 0 tests found. lib/libgeochemistry-unit-dbg.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-dbg.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. This seems to be whymoose/unit
is working,main()
callsregisterApp(MooseUnitApp)
which is in libmoose-unit-dbg.so. The modules don't have separate unit test apps, so they just callregisterApp(<Module>App)
. The other way to possibly fix this would be to not have a separate shared library for the tests and link main.o along with all the test object files.Impact
Testing good, especially if the tests already exist!