#
# If tests have to be skipped while building, specify the '--without check'
# option. For example:
-# rpmbuild -bb --without check rhel/openvswitch-fedora.spec
+# rpmbuild -bb --without check rhel/openvswitch-fedora.spec
+#
+# Support for executing kernel data path tests under rpmbuild is
+# provided, however this is intended for use only in test environments
+# and should not be used otherwise (these tests require root privileges).
+# These tests can be executed, for example, via:
+# rpmbuild -rb --with check_datapath_kernel openvswitch-fedora.src.rpm
+#
+# These tests will use the currently installed OVS kernel modules, when
+# testing out of tree kernel modules the appropriate openvswitch-kmod
+# package should be installed first.
#%define kernel 2.6.40.4-5.fc15.x86_64
Obsoletes: openvswitch-controller <= 0:2.1.0-1
%bcond_without check
+%bcond_with check_datapath_kernel
%description
Open vSwitch provides standard network bridging functions and
exit 1
fi
%endif
+%if %{with check_datapath_kernel}
+ if make check-kernel RECHECK=yes; then :;
+ else
+ cat tests/system-kmod-testsuite.log
+ exit 1
+ fi
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
#
# If tests have to be skipped while building, specify the '--without check'
# option. For example:
-# rpmbuild -bb --without check rhel/openvswitch.spec
+# rpmbuild -bb --without check rhel/openvswitch.spec
+#
+# Support for executing kernel data path tests under rpmbuild is
+# provided, however this is intended for use only in test environments
+# and should not be used otherwise (these tests require root privileges).
+# These tests can be executed, for example, via:
+# rpmbuild -rb --with check_datapath_kernel openvswitch.src.rpm
+#
+# These tests will use the currently installed OVS kernel modules, when
+# testing out of tree kernel modules the appropriate openvswitch-kmod
+# package should be installed first.
Name: openvswitch
Summary: Open vSwitch daemon/database/utilities
BuildRequires: checkpolicy, selinux-policy-devel
%bcond_without check
+%bcond_with check_datapath_kernel
%description
Open vSwitch provides standard network bridging functions and
exit 1
fi
%endif
+%if %{with check_datapath_kernel}
+ if make check-kernel RECHECK=yes; then :;
+ else
+ cat tests/system-kmod-testsuite.log
+ exit 1
+ fi
+%endif
%clean
rm -rf $RPM_BUILD_ROOT