diff options
author | John Morris <john@zultron.com> | 2013-08-04 17:07:29 -0500 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2013-10-28 08:05:23 -0400 |
commit | 4a9c6e0292a31991c5dbe9acc770ce7934b5edf7 (patch) | |
tree | 9e1e5f65dddaeefd09006679bc9c2979b4c5d3ea /misc | |
parent | 09d4793eed6e5e7b0e217059e1ecb6805bcf299c (diff) | |
download | bcfg2-4a9c6e0292a31991c5dbe9acc770ce7934b5edf7.tar.gz bcfg2-4a9c6e0292a31991c5dbe9acc770ce7934b5edf7.tar.bz2 bcfg2-4a9c6e0292a31991c5dbe9acc770ce7934b5edf7.zip |
misc/bcfg2.spec: reconcile: add the new %check script
Diffstat (limited to 'misc')
-rw-r--r-- | misc/bcfg2.spec | 19 |
1 files changed, 18 insertions, 1 deletions
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 |