diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2014-06-23 14:05:00 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2014-07-01 07:53:38 -0700 |
commit | 329cf2328c4eaae3164181ed5afaadd26289d8ca (patch) | |
tree | 73ac004dd12783ec2cf6595ffeb299264e1f5e09 /rhel/openvswitch.spec.in | |
parent | 84d6d5ebbf9a7b58a3d576139dc73cad15dca4f0 (diff) | |
download | openvswitch-329cf2328c4eaae3164181ed5afaadd26289d8ca.tar.gz |
rhel, xenserver: Run unit tests while creating rpms.
For RHEL, Fedora and Xenserver, run unit tests while
building rpms. This may catch some cross-platform bugs.
The commit also allows the users to optionally skip unit tests.
(On debian, the default is to run unit tests. For consistency,
do the same for rpms.)
VMware-BZ: 1267127
CC: Flavio Leitner <fbl@redhat.com>
CC: Ben Pfaff <blp@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Tested-by: Flavio Leitner <fbl@redhat.com>
Diffstat (limited to 'rhel/openvswitch.spec.in')
-rw-r--r-- | rhel/openvswitch.spec.in | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in index 18bc10c22..c817cce06 100644 --- a/rhel/openvswitch.spec.in +++ b/rhel/openvswitch.spec.in @@ -6,6 +6,10 @@ # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without warranty of any kind. +# +# If tests have to be skipped while building, specify the '--without check' +# option. For example: +# rpmbuild -bb --without check rhel/openvswitch.spec Name: openvswitch Summary: Open vSwitch daemon/database/utilities @@ -21,6 +25,8 @@ Buildroot: /tmp/openvswitch-rpm Requires: openvswitch-kmod, logrotate, python BuildRequires: openssl-devel +%bcond_without check + %description Open vSwitch provides standard network bridging functions and support for the OpenFlow protocol for remote per-flow control of @@ -67,6 +73,16 @@ rm \ install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch +%check +%if %{with check} + if make check TESTSUITEFLAGS='%{_smp_mflags}' || + make check TESTSUITEFLAGS='--recheck'; then :; + else + cat tests/testsuite.log + exit 1 + fi +%endif + %clean rm -rf $RPM_BUILD_ROOT |