Sync with upstream release 47.0.

Enable self-tests during build.
Add example test to be run by Taskotron.
This commit is contained in:
Merlin Mathesius 2017-03-27 14:56:27 -05:00
commit 9f6f5dcf7f
7 changed files with 80 additions and 4 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/avocado-43.0.tar.gz
/avocado-46.0.tar.gz
/avocado-47.0.tar.gz

View file

@ -20,11 +20,11 @@
# selftests are provided but skipped because many contain race conditions
# causing random build failures
%global with_tests 0
%global with_tests 1
Name: python-%{srcname}
Version: 46.0
Release: 2%{?gitrel}%{?dist}
Version: 47.0
Release: 1%{?gitrel}%{?dist}
Summary: Framework with tools and libraries for Automated Testing
Group: Development/Tools
# Found licenses:
@ -51,6 +51,7 @@ BuildRequires: python-lxml
BuildRequires: python2-mock
%if %{with_tests}
BuildRequires: libvirt-python
BuildRequires: perl(TAP::Parser)
%endif
@ -327,6 +328,11 @@ selftests/run
%{_docdir}/avocado/wrappers
%changelog
* Mon Mar 27 2017 Merlin Mathesius <mmathesi@redhat.com> - 47.0-1
- Sync with upstream release 47.0.
- Enable self-tests during build.
- Add example test to be run by Taskotron.
* Mon Feb 27 2017 Merlin Mathesius <mmathesi@redhat.com> - 46.0-2
- Incorporate upstream SPEC file changes to split plugins into subpackages.
- Remove obsolete CC-BY-SA license, which went away with the halflings font.

View file

@ -1 +1 @@
SHA512 (avocado-46.0.tar.gz) = f3e3c1109803da79e2a15e7e02d7b843f8604a592f81fd8075081e61bdd9059c2c02a1f0333479a2bb09dcc7c13b4104a3e02686d96937c69bc6c2c0d41524da
SHA512 (avocado-47.0.tar.gz) = 196bcd2d79835d6426428098f4c713507907feb28629eb7cf261c00f010bdf169f19420d627e2895183d00860b01d31b25a59e88e0de6115bcaa876e8ccc951c

View file

@ -0,0 +1,14 @@
.PHONY: all install download clean
BUILT_FILES=
FILES=runtest.sh Makefile
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x ./runtest.sh
clean:
rm -f *~ $(BUILT_FILES)

View file

@ -0,0 +1,13 @@
help-usage-1
============
This is an example task for `Taskotron <https://fedoraproject.org/wiki/Taskotron>`_
that tests the basic functionality of 'avocado --help' to confirm it generates a usage message.
Standalone you can run it like this::
$ make run
Through taskotron runner you can run it like this::
$ runtask -i python-avocado-46.0-2.fc25 -t koji_build -a noarch runtask.yml

View file

@ -0,0 +1,29 @@
---
name: help-usage-1
desc: "Tests the basic functionality of 'avocado --help' to confirm it generates a usage message."
maintainer: merlinm
input:
args:
- koji_build
- arch
environment:
rpm:
- make
actions:
- name: download the build
koji:
action: download
koji_build: ${koji_build}
arch: $arch
target_dir: ${workdir}/rpms
- name: install the build
shell:
- dnf install -y ${workdir}/rpms/*.rpm
- name: run test
shell:
- make run

13
test/help-usage-1/runtest.sh Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
PACKAGE=python-avocado
# Assume the test will pass.
result=PASS
avocado --help | grep -q -i '^usage:'
if [ $? -ne 0 ]; then
result=FAIL
fi
echo $result