From 4a9c6e0292a31991c5dbe9acc770ce7934b5edf7 Mon Sep 17 00:00:00 2001 From: John Morris Date: Sun, 4 Aug 2013 17:07:29 -0500 Subject: misc/bcfg2.spec: reconcile: add the new %check script --- misc/bcfg2.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'misc/bcfg2.spec') diff --git a/misc/bcfg2.spec b/misc/bcfg2.spec index c5388ebfc..3fa230f82 100644 --- a/misc/bcfg2.spec +++ b/misc/bcfg2.spec @@ -35,7 +35,11 @@ Group: Applications/System %endif License: BSD URL: http://bcfg2.org -Source0: ftp://ftp.mcs.anl.gov/pub/bcfg/%{name}-%{version}.tar.gz +Source0: ftp://ftp.mcs.anl.gov/pub/bcfg/bcfg2-%{version}%{?_pre_rc}.tar.gz +Source1: ftp://ftp.mcs.anl.gov/pub/bcfg/bcfg2-%{version}%{?_pre_rc}.tar.gz.gpg +# Used in %%check +Source2: http://www.w3.org/2001/XMLSchema.xsd +Source3: http://www.w3.org/2001/xml.xsd %if %{?rhel}%{!?rhel:10} <= 5 || 0%{?suse_version} # EL5 and OpenSUSE require the BuildRoot tag BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -556,6 +560,19 @@ touch %{buildroot}%{_sysconfdir}/bcfg2.conf \ %endif %doc %{_defaultdocdir}/bcfg2-examples-%{version}%{?_pre_rc} + +%if 0%{?rhel} != 5 +# EL5 lacks python-mock, so test suite is disabled +%check +# Downloads not allowed in koji; fix .xsd urls to point to local files +sed -i "s@schema_url = .*\$@schema_url = 'file://`pwd`/`basename %{SOURCE2}`'@" \ + testsuite/Testschema/test_schema.py +sed 's@http://www.w3.org/2001/xml.xsd@file://%{SOURCE3}@' \ + %{SOURCE2} > `basename %{SOURCE2}` +%{__python} setup.py test +%endif + + %post server # enable daemon on first install only (not on update). if [ $1 -eq 1 ]; then -- cgit v1.2.3-1-g7c22