Bug 34405 - "make check" in a clean tree fails, must run "make" first
Summary: "make check" in a clean tree fails, must run "make" first
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.4.x
Hardware: Other All
: lowest trivial
Assignee: Simon McVittie
QA Contact: John (J5) Palmieri
URL: http://cgit.freedesktop.org/~smcv/dbu...
Whiteboard: build system trivia
Keywords: patch
Depends on:
Blocks: dbus-1.4
  Show dependency treegraph
 
Reported: 2011-02-17 09:54 UTC by Simon McVittie
Modified: 2011-07-18 11:45 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
[PATCH 1/5] test/Makefile.am: list tests one per line (1.38 KB, patch)
2011-06-06 08:17 UTC, Simon McVittie
Details | Splinter Review
[PATCH 2/5] dbus tests: don't warn on skipped tests (1.65 KB, patch)
2011-06-06 08:17 UTC, Simon McVittie
Details | Splinter Review
[PATCH 3/5] Run dbus-test from test/, not dbus/ (2.07 KB, patch)
2011-06-06 08:18 UTC, Simon McVittie
Details | Splinter Review
[PATCH 4/5] Run bus tests from test/ (2.50 KB, patch)
2011-06-06 08:18 UTC, Simon McVittie
Details | Splinter Review
[PATCH 5/5] Build docs after running tests, and remove redundant DIST_SUBDIRS (969 bytes, patch)
2011-06-06 08:19 UTC, Simon McVittie
Details | Splinter Review
[PATCH 3/5 v2] Run dbus-test from test/, not dbus/ (2.20 KB, patch)
2011-06-13 03:10 UTC, Simon McVittie
Details | Splinter Review
[PATCH 4/5 v2] Run bus tests from test/ (2.64 KB, patch)
2011-06-13 03:13 UTC, Simon McVittie
Details | Splinter Review
[PATCH 6] Use EXEEXT when running tests from another directory, and skip bus-test-launch-helper on non-Unix (1.13 KB, patch)
2011-06-15 04:47 UTC, Simon McVittie
Details | Splinter Review

Description Simon McVittie 2011-02-17 09:54:36 UTC
SUBDIRS are processed in strict order; we currently use:

    dbus bus doc tools test

However, the regression tests for dbus/ require things from test/, so you can't "make check" in dbus before you've done "make" in test; so dbus should come after test.

Conversely, some things in test/ require libdbus, so dbus must come before test. Chicken, egg.

I suggest moving at least the test wrappers (things with a main()) from dbus and bus into test.

This would also have the advantage that "make check" checks that everything compiles before it tries to run anything.
Comment 1 Simon McVittie 2011-06-06 08:16:50 UTC
This has finally annoyed me enough to make a branch.

I only moved the execution of the tests to test/, not their compilation, in order that they keep their current CFLAGS (which are not necessarily the same as the ones in test/).

I'd like to get this right in the dbus-1.4 branch (since it doesn't actually touch anything in the library or bus daemon code), but if you think this should be reserved for dbus-1.5, please say so when reviewing.
Comment 2 Simon McVittie 2011-06-06 08:17:38 UTC
Created attachment 47609 [details] [review]
[PATCH 1/5] test/Makefile.am: list tests one per line

This improves clarity, and makes conflicts less likely and merges more
obviously correct.
Comment 3 Simon McVittie 2011-06-06 08:17:59 UTC
Created attachment 47610 [details] [review]
[PATCH 2/5] dbus tests: don't warn on skipped tests

We should treat _dbus_warn as fatal when we run tests, like bus/ does.
Comment 4 Simon McVittie 2011-06-06 08:18:20 UTC
Created attachment 47611 [details] [review]
[PATCH 3/5] Run dbus-test from test/, not dbus/

This avoids failures caused by test/data not having been set up yet.
Comment 5 Simon McVittie 2011-06-06 08:18:38 UTC
Created attachment 47612 [details] [review]
[PATCH 4/5] Run bus tests from test/
Comment 6 Simon McVittie 2011-06-06 08:19:00 UTC
Created attachment 47613 [details] [review]
[PATCH 5/5] Build docs after running tests, and remove redundant  DIST_SUBDIRS

If DIST_SUBDIRS isn't set, it defaults to SUBDIRS, so it's just noise.
 
Running tests before building documentation is an easy way to speed up the
hack/make check/fix cycle, by not wasting time rebuilding the
documentation (which is often slow) until all the tests compile and pass.
Comment 7 Simon McVittie 2011-06-13 03:10:24 UTC
Created attachment 47888 [details] [review]
[PATCH 3/5 v2] Run dbus-test from test/, not dbus/

Replacement for Attachment #47611 [details], adjusted to apply after Bug #34570.
Comment 8 Simon McVittie 2011-06-13 03:13:10 UTC
Created attachment 47890 [details] [review]
[PATCH 4/5 v2] Run bus tests from test/

Revised version of Attachment #47612 [details], to apply after 3/5 v2
Comment 9 Simon McVittie 2011-06-15 04:47:39 UTC
Created attachment 47993 [details] [review]
[PATCH 6] Use EXEEXT when running tests from another directory, and  skip bus-test-launch-helper on non-Unix

This is necessary when cross-compiling from Linux to mingw32 and running
the resulting tests under Wine. (This partially works! Some tests fail,
though.)
Comment 10 Will Thompson 2011-07-18 10:59:46 UTC
Review of attachment 47609 [details] [review]:

++
Comment 11 Will Thompson 2011-07-18 11:00:27 UTC
Review of attachment 47610 [details] [review]:

Looks fine.
Comment 12 Will Thompson 2011-07-18 11:02:41 UTC
Review of attachment 47888 [details] [review]:

Looks fine.
Comment 13 Will Thompson 2011-07-18 11:07:29 UTC
Review of attachment 47890 [details] [review]:

Fine.
Comment 14 Will Thompson 2011-07-18 11:08:43 UTC
Review of attachment 47613 [details] [review]:

++
Comment 15 Will Thompson 2011-07-18 11:11:24 UTC
Review of attachment 47993 [details] [review]:

Haha :) ++
Comment 16 Simon McVittie 2011-07-18 11:45:16 UTC
Thanks, fixed in git for 1.4.12, 1.5.6.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.