After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702339 - [MM 0.8] Remove --with-tests option and port to automake test support
[MM 0.8] Remove --with-tests option and port to automake test support
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: ModemManager
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: 702220
 
 
Reported: 2013-06-15 14:20 UTC by Aleksander Morgado
Modified: 2013-06-20 07:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch. (5.28 KB, patch)
2013-06-15 14:21 UTC, Aleksander Morgado
none Details | Review

Description Aleksander Morgado 2013-06-15 14:20:15 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'.
Comment 1 Aleksander Morgado 2013-06-15 14:21:43 UTC
Created attachment 246894 [details] [review]
Patch.
Comment 2 Dan Williams 2013-06-17 14:59:26 UTC
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?
Comment 3 Aleksander Morgado 2013-06-18 07:01:23 UTC
> 
> 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.
Comment 4 Aleksander Morgado 2013-06-18 14:13:18 UTC
(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?
Comment 5 Aleksander Morgado 2013-06-18 15:16:24 UTC
Please review the 'aleksander/gtester' branch in git. I imported GLib's gtester-based testing, which provides much nicer results for our tests.
Comment 6 Dan Williams 2013-06-19 18:00:15 UTC
(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'.
Comment 7 Dan Williams 2013-06-19 18:11:19 UTC
(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.
Comment 8 Aleksander Morgado 2013-06-20 07:55:44 UTC
Merged to git master.