[libvirt] [libvirt-glib 0/2] Fix make distcheck

Hey, After the introduction of the GTest unit tests, make distcheck still has a few issues, with this series, make distcheck passes on my box (using glib 2.38). Christophe

When deciding which files to put into the make dist tarball, automake is clever enough to ignore conditional blocks, and to pick all files which are needed for all values of the conditional. Having EXTRA_DIST=xxx at the beginning of tests/Makefile.am causes warnings from automake when ENABLE_TESTS is true as glib-tap.mk will unconditionally empty it. Keeping EXTRA_DIST+=xxx outside of the ENABLE_TESTS conditional would cause a different warning from automake when ENABLE_TESTS is false as we'd be appending to a variable which was never set. Moving EXTRA_DIST+= back into the conditional solves these 2 warnings. --- tests/Makefile.am | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 8cb98e5..041415f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,9 +1,3 @@ -EXTRA_DIST = \ - xml/gconfig-domain.xml \ - xml/gconfig-domain-clock.xml \ - xml/gconfig-domain-os.xml \ - $(NULL) - if ENABLE_TESTS include $(top_srcdir)/build-aux/glib-tap.mk @@ -22,9 +16,9 @@ LDADD = \ test_programs = test-gconfig test-events -else EXTRA_DIST += \ - test-events.c \ - test-gconfig.c \ + xml/gconfig-domain.xml \ + xml/gconfig-domain-clock.xml \ + xml/gconfig-domain-os.xml \ $(NULL) endif -- 1.8.5.3

On Mon, Feb 24, 2014 at 12:56:21PM +0100, Christophe Fergeau wrote:
When deciding which files to put into the make dist tarball, automake is clever enough to ignore conditional blocks, and to pick all files which are needed for all values of the conditional.
Having EXTRA_DIST=xxx at the beginning of tests/Makefile.am causes warnings from automake when ENABLE_TESTS is true as glib-tap.mk will unconditionally empty it.
Keeping EXTRA_DIST+=xxx outside of the ENABLE_TESTS conditional would cause a different warning from automake when ENABLE_TESTS is false as we'd be appending to a variable which was never set.
Moving EXTRA_DIST+= back into the conditional solves these 2 warnings. --- tests/Makefile.am | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

Some files are missing from EXTRA_DIST, causing make distcheck to fail when tests are enabled. --- Makefile.am | 2 ++ tests/Makefile.am | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/Makefile.am b/Makefile.am index 0eba6e2..ae8b06d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,6 +16,8 @@ EXTRA_DIST = $(PACKAGE).spec \ AUTHORS.in \ build-aux/check-symfile.pl \ build-aux/check-symsorting.pl \ + tap-driver.sh \ + tap-test \ $(NULL) DISTCLEAN_FILES = $(PACKAGE).spec $(pkgconfig_DATA) diff --git a/tests/Makefile.am b/tests/Makefile.am index 041415f..63865e8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -19,6 +19,16 @@ test_programs = test-gconfig test-events EXTRA_DIST += \ xml/gconfig-domain.xml \ xml/gconfig-domain-clock.xml \ + xml/gconfig-domain-cpu.xml \ + xml/gconfig-domain-device-channel.xml \ + xml/gconfig-domain-device-console.xml \ + xml/gconfig-domain-device-disk.xml \ + xml/gconfig-domain-device-graphics.xml \ + xml/gconfig-domain-device-input.xml \ + xml/gconfig-domain-device-network.xml \ + xml/gconfig-domain-device-sound.xml \ + xml/gconfig-domain-device-usbredir.xml \ + xml/gconfig-domain-device-video.xml \ xml/gconfig-domain-os.xml \ $(NULL) endif -- 1.8.5.3

On Mon, Feb 24, 2014 at 12:56:22PM +0100, Christophe Fergeau wrote:
Some files are missing from EXTRA_DIST, causing make distcheck to fail when tests are enabled. --- Makefile.am | 2 ++ tests/Makefile.am | 10 ++++++++++ 2 files changed, 12 insertions(+)
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Christophe Fergeau
-
Daniel P. Berrange