From 14fdfb9c9aebdd31bf1cb8bbd22ffb4fea2827b351b325bf51206e03319beafc Mon Sep 17 00:00:00 2001 From: Stefan Knorr Date: Wed, 7 Feb 2018 12:58:28 +0000 Subject: [PATCH] Accepting request 573700 from home:thomas-schraitle:branches:Documentation:Tools - Add bcond_with tests to activate test suite OBS-URL: https://build.opensuse.org/request/show/573700 OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/geekodoc?expand=0&rev=21 --- geekodoc.changes | 5 +++++ geekodoc.spec | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/geekodoc.changes b/geekodoc.changes index 9a5e385..ab2ed33 100644 --- a/geekodoc.changes +++ b/geekodoc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 7 12:15:55 UTC 2018 - thomas.schraitle@suse.com + +- Add bcond_with tests to activate test suite + ------------------------------------------------------------------- Tue Feb 6 14:49:06 UTC 2018 - thomas.schraitle@suse.com diff --git a/geekodoc.spec b/geekodoc.spec index 8c7a82e..80dfec3 100644 --- a/geekodoc.spec +++ b/geekodoc.spec @@ -16,6 +16,8 @@ # +%bcond_with tests +# Name: geekodoc Version: 1.0.2 Release: 0 @@ -29,6 +31,10 @@ BuildRequires: make BuildRequires: python3-rnginline BuildRequires: python3-setuptools BuildRequires: trang +%if 0%{with tests} +BuildRequires: jing +BuildRequires: libxml2-tools +%endif Requires: sgml-skel >= 0.7 Requires(post): sgml-skel >= 0.7 Requires(postun): sgml-skel >= 0.7 @@ -50,7 +56,9 @@ NovDoc is a DTD/RELAX NG schema used for older SUSE documentation. %prep %setup -q +%if 0%{without tests} [[ -d geekodoc/tests ]] && rm -rf geekodoc/tests +%endif %build touch geekodoc/rng/geekodoc5.rnc @@ -76,7 +84,7 @@ cp novdoc/rng/novdocxi-flat.rn? novdoc/rng/novell.ent %{buildroot}%{_datadir}/xm cp catalog.d/* %{buildroot}%{_sysconfdir}/xml/catalog.d/ # Fixup catalog paths -sed -i'' 's#"\.\./#"%{_datadir}/xml/#' %{buildroot}%{_sysconfdir}/xml/catalog.d/* +sed -i 's#"\.\./#"%{_datadir}/xml/#' %{buildroot}%{_sysconfdir}/xml/catalog.d/* %post update-xml-catalog @@ -99,6 +107,13 @@ exit 0 %postun -n novdoc update-xml-catalog +%if 0%{with tests} +%check +cd geekodoc/tests +./run-tests.sh -V xmllint +./run-tests.sh -V jing +%endif + %files %license LICENSE %config %{_sysconfdir}/xml/catalog.d/geekodoc.xml