[NEW PATCH] Make tests work in a non-GIT checkout environment (via gerrit-bot)

Federico Simoncelli fsimonce at redhat.com
Mon Aug 22 14:14:07 UTC 2011


New patch submitted by Federico Simoncelli (fsimonce at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/836

commit c66207dc20246e909782f0d674b756ab544263f2
Author: Daniel P. Berrange <berrange at redhat.com>
Date:   Mon Aug 22 14:39:53 2011 +0100

    Make tests work in a non-GIT checkout environment
    
    Replace the 'dist-hook' target, with the 'check-local' target,
    which is the automake standard for adding tests to 'make check'.
    Add 'pyflakes' as a build pre-requisite for the RPM, and run
    tests as part of the RPM build process
    
    * Makefile.am: Switch to use 'check-local' for tests and avoid
      use of GIT commands
    * vdsm.spec.in: Add BR on pyflakes & add %check section
    
    Change-Id: I72cb5ca17ae09e21d3d995cf206f4e05ada4e4b9

diff --git a/Makefile.am b/Makefile.am
index f51e595..35f3712 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,7 @@ rpmversion = @PACKAGE_VERSION@
 rpmrelease = @PACKAGE_RELEASE@
 RPMTOP = $(PWD)/rpmtop
 
-dist-hook:
+check-local:
 	pyflakes $(SUBDIRS)
 
 .PHONY: srpm rpm
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 60de31b..9de01b6 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -34,6 +34,7 @@ Requires: libvirt-python
 Requires: dosfstools
 Requires: policycoreutils-python
 Requires(post): cyrus-sasl-lib
+BuildRequires: pyflakes
 Conflicts: selinux-policy-targeted < 3.7.19-80.el6
 
 %description
@@ -57,6 +58,9 @@ make DESTDIR=%{buildroot} install
 # dropbox for core dumps.
 install -dDm 1777 "%{buildroot}"%{_localstatedir}/log/core
 
+%check
+make check
+
 %clean
 %{__rm} -rf %{buildroot}
 
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index dc3c017..766687a 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -51,7 +51,7 @@ dist_vdsmstorage_DATA = \
 EXTRA_DIST = \
 	12-vdsm-lvm.rules
 
-dist-hook:
+check-local:
 	python $(srcdir)/storage_exception.py
 
 install-data-local:




More information about the vdsm-patches mailing list