提交 1b41f7fa 编写于 作者: C Cleber Rosa 提交者: Lukáš Doktor

Packaging: add bash RPM sub package

To remove some of the bloat (even if little) of the base
python-avocado package, let's move content that is not useful to
Python developers out of the way.

This should also make the experience of content more similar across
users of the Python module (say, from a `pip install`) and users of
the python-avocado package.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 3e9a3268
......@@ -1724,18 +1724,28 @@ tests:
+-----------------------------+---------------------------------------+-----------------------------------------------------------------------------------------------------+
Simple Tests BASH extensions
SIMPLE Tests BASH extensions
============================
To enhance simple tests one can use supported set of libraries we created. The
only requirement is to use::
SIMPLE tests written in shell can use a few Avocado utilities. In your
shell code, check if the libraries are available with something like::
PATH=$(avocado "exec-path"):$PATH
AVOCADO_SHELL_EXTENSIONS_DIR=$(avocado exec-path 2>/dev/null)
which injects path to Avocado utils into shell PATH. Take a look into
``avocado exec-path`` to see list of available functions and take a look at
``examples/tests/simplewarning.sh`` for inspiration.
And if available, injects that directory containing those utilities
into the PATH used by the shell, making those utilities readily
accessible::
if [ $? == 0 ]; then
PATH=$AVOCADO_SHELL_EXTENSIONS_DIR:$PATH
fi
For a full list of utilities, take a look into at the directory return
by ``avocado exec-path`` (if any). Also, the example test
``examples/tests/simplewarning.sh`` can serve as further inspiration.
.. tip:: These extensions may be available as a separate package. For
RPM packages, look for the ``bash`` sub-package.
Wrap Up
=======
......
......@@ -194,6 +194,8 @@ popd
%{__cp} -r examples/yaml_to_mux %{buildroot}%{_datadir}/avocado
%{__cp} -r examples/yaml_to_mux_loader %{buildroot}%{_datadir}/avocado
%{__cp} -r examples/varianter_pict %{buildroot}%{_datadir}/avocado
%{__install} -d -m 0755 %{buildroot}%{_libexecdir}/avocado
%{__install} -m 0755 libexec/avocado* %{buildroot}%{_libexecdir}/avocado
%check
%if %{with_tests}
......@@ -277,11 +279,6 @@ AVOCADO_CHECK_LEVEL=0 selftests/run
%exclude %{python_sitelib}/avocado_framework_plugin_loader_yaml*
%exclude %{python_sitelib}/avocado_framework_plugin_golang*
%exclude %{python_sitelib}/avocado_framework_plugin_result_upload*
%{_libexecdir}/avocado/avocado-bash-utils
%{_libexecdir}/avocado/avocado_debug
%{_libexecdir}/avocado/avocado_error
%{_libexecdir}/avocado/avocado_info
%{_libexecdir}/avocado/avocado_warn
%package plugins-output-html
Summary: Avocado HTML report plugin
......@@ -449,12 +446,28 @@ examples of how to write tests on your own.
%{_datadir}/avocado/yaml_to_mux_loader
%{_datadir}/avocado/varianter_pict
%package bash
Summary: Avocado Test Framework Bash Utilities
Requires: %{name} == %{version}
%description bash
A small set of utilities to interact with Avocado from the Bourne
Again Shell code (and possibly other similar shells).
%files bash
%{_libexecdir}/avocado/avocado-bash-utils
%{_libexecdir}/avocado/avocado_debug
%{_libexecdir}/avocado/avocado_error
%{_libexecdir}/avocado/avocado_info
%{_libexecdir}/avocado/avocado_warn
%changelog
* Sat Jan 6 2018 Cleber Rosa <cleber@redhat.com> - 57.0-3
- Move the avocado package config files to the system location
- Add missing configuration files for sub packages
- Adapt to change in example file installation
- Remove man pages source files from package
- Add bash subpackage
* Tue Dec 19 2017 Cleber Rosa <cleber@redhat.com> - 57.0-2
- Removed patch added on release 1, considering it's upstream
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册