GNOME Bugzilla – Bug 702339
[MM 0.8] Remove --with-tests option and port to automake test support
Last modified: 2013-06-20 07:55:44 UTC
Automake has built-in support to handle running tests: * Targets added to 'check_PROGRAMS' will get built only during 'make check' (and therefore we can avoid having an explicit --with-tests configure switch). * Targets added to 'TESTS' will be run as tests during 'make check'.
Created attachment 246894 [details] [review] Patch.
I think the only reason I did it this way was to ensure that tests were always built (but not run!), so we could catch testcase bitrot earlier. eg, when you make any change, failure to update testcases would be a build failure and thus you'd have to fix it before submitting your patch/branch for review. I still think that's useful, though I like killing --with-tests. Would it work to leave the noinst_PROGRAMS bits, but move stuff from check-local to TESTS to take advantage of at least some of the automake stuff?
> > Would it work to leave the noinst_PROGRAMS bits, but move stuff from > check-local to TESTS to take advantage of at least some of the automake stuff? Will do that, ok.
(In reply to comment #2) > I think the only reason I did it this way was to ensure that tests were always > built (but not run!), so we could catch testcase bitrot earlier. eg, when you > make any change, failure to update testcases would be a build failure and thus > you'd have to fix it before submitting your patch/branch for review. I still > think that's useful, though I like killing --with-tests. > Wait, so actually --with-tests is really thought to just avoid running tests during 'make check'? Wouldn't just not running 'make check' be enough for that use case?
Please review the 'aleksander/gtester' branch in git. I imported GLib's gtester-based testing, which provides much nicer results for our tests.
(In reply to comment #4) > (In reply to comment #2) > > I think the only reason I did it this way was to ensure that tests were always > > built (but not run!), so we could catch testcase bitrot earlier. eg, when you > > make any change, failure to update testcases would be a build failure and thus > > you'd have to fix it before submitting your patch/branch for review. I still > > think that's useful, though I like killing --with-tests. > > > > Wait, so actually --with-tests is really thought to just avoid running tests > during 'make check'? Wouldn't just not running 'make check' be enough for that > use case? I actually don't recall why --with-tests is around. 'make check' is clearly meant to run the tests, and if you didn't enable tests, it seems quite silly to run 'make check'. I think it's fine to remove --with-tests entirely and always build the tests, but of course only run them with 'make check'.
(In reply to comment #5) > Please review the 'aleksander/gtester' branch in git. I imported GLib's > gtester-based testing, which provides much nicer results for our tests. Branch looks good to me, and passes distcheck.
Merged to git master.