[kyua-cli] Add a new kyua-tests subpackage
Julio Merino
jmmv at fedoraproject.org
Tue Jun 19 00:15:42 UTC 2012
commit 11b101fc485cdb8086e9bf53f711a7c252931b83
Author: Julio Merino <jmmv at julipedia.org>
Date: Mon Jun 18 20:04:59 2012 -0400
Add a new kyua-tests subpackage
This new subpackage ships all the run-time tests of Kyua, ready to be
run on any system after installation.
README.Fedora | 12 ++++++++++++
kyua-cli.spec | 42 +++++++++++++++++++++++++++++++++++++-----
2 files changed, 49 insertions(+), 5 deletions(-)
---
diff --git a/README.Fedora b/README.Fedora
new file mode 100644
index 0000000..fc7d88c
--- /dev/null
+++ b/README.Fedora
@@ -0,0 +1,12 @@
+This package provides the full collection of test programs to validate
+the functionality of Kyua.
+
+Because the Linux Standard Base does not recognize a /usr/tests/
+directory (the standard location for ATF-based tests), the test suite is
+installed within the libexec hierarchy. In particular, such tests can
+be found in /usr/libexec/kyua-cli/tests/ .
+
+The tests are to be executed with the kyua(1) utility. You can simply
+run them by issuing the following command:
+
+ $ kyua test -k /usr/libexec/kyua-cli/tests/Kyuafile
diff --git a/kyua-cli.spec b/kyua-cli.spec
index fdd0311..f9f6ead 100644
--- a/kyua-cli.spec
+++ b/kyua-cli.spec
@@ -1,18 +1,23 @@
Summary: Kyua - Command line interface
Name: kyua-cli
Version: 0.4
-Release: 1%{?dist}
+Release: 2%{?dist}
License: BSD
Group: Development/Tools
URL: http://code.google.com/p/kyua/
Source0: http://kyua.googlecode.com/files/%{name}-%{version}.tar.gz
+Source1: README.Fedora
Requires: lutok >= 0.2
Requires: sqlite >= 3.6.22
Requires(post): info
Requires(preun): info
+BuildRequires: libatf-c++-devel >= 0.15
+BuildRequires: libatf-sh-devel >= 0.15
BuildRequires: lutok-devel >= 0.2-1
BuildRequires: sqlite-devel >= 3.6.22
+%define _testsdir %{_libexecdir}/kyua-cli/tests
+
%description
Kyua (pronounced Q.A.) is a testing framework for both developers and
users. Kyua is different from most other testing frameworks in that it
@@ -28,15 +33,23 @@ their results.
%prep
%setup -q
+# Put the README.Fedora file in the top-level directory of the source tree so
+# that the %doc call below can pick it up.
+cp -p %{SOURCE1} README.Fedora
+
%build
-%configure --without-atf --without-doxygen
-make %{?_smp_mflags}
+%configure --without-doxygen
+make %{?_smp_mflags} pkgtestsdir=%{_testsdir} testsdir=%{_testsdir}
%check
-make check
+# The check stage runs the tests using Kyua itself and Kyua accesses the home
+# directory to store logs and the database. Override HOME to a known value to
+# ensure these files get discarded.
+HOME=$(pwd)/check make check pkgtestsdir=%{_testsdir} testsdir=%{_testsdir}
%install
-make install DESTDIR=%{buildroot} doc_DATA=
+make install DESTDIR=%{buildroot} doc_DATA= \
+ pkgtestsdir=%{_testsdir} testsdir=%{_testsdir}
rm -f %{buildroot}/%{_infodir}/dir
%post
@@ -54,6 +67,25 @@ fi
%{_datadir}/kyua-cli
%{_mandir}/man1/kyua.1.gz
+%package tests
+Summary: Run-time tests of the Kyua toolchain
+Requires: %{name} = %{version}-%{release}
+Requires: libatf-c++ >= 0.15
+Requires: libatf-sh >= 0.15
+
+%description tests
+This package installs the run-time tests for the Kyua toolchain.
+Please see the README.Fedora file in the documentation directory for further
+details on how to run the installed tests.
+
+%files tests
+%doc README.Fedora
+%{_testsdir}
+
%changelog
+* Mon Jun 18 2012 Julio Merino <jmmv at google.com> 0.4-2
+- Added the kyua-tests package providing the run-time tests of Kyua, readily
+ runnable by the end users.
+
* Thu Jun 07 2012 Julio Merino <jmmv at google.com> 0.4-1
- Initial version of the package.
More information about the scm-commits
mailing list