* New upstream release.

* Added myself as uploader.
  * Added python{3,}-ddt as build-depends.
  * Using git tag based workflow as the package is from OpenStack:
    - Dropped upstream tarball artifacts (ChangeLog, AUTHORS, PKG-INFO).
    - Fixed debian/gbp.conf
    - Added export OSLO_PACKAGE_VERSION=$(VERSION) in debian/rules.
  * Added unit tests:
    - Added it in debian/rules.
    - Added in debian/bin/* commands which are normally generated by pbr, so
      that we can run unit tests.
  * Dropped Py3 compat patch applied upstream.
This commit is contained in:
Thomas Goirand 2015-07-07 21:49:33 +02:00
parent 206f013161
commit 364f0f21c9
12 changed files with 78 additions and 130 deletions

View File

@ -1 +0,0 @@
Matthew Treinish <mtreinish@kortar.org>

View File

@ -1,22 +0,0 @@
CHANGES
=======
0.1.0
-----
* Fix pep8 issues and add apache header to subunit2html
* Flush out the readme in preparation for the first release
* Add subunit2html from jenkins slave scripts
* Ensure failure is printed with --until-failure in pretty mode
* Add --until-failure option to ostestr
* Add basic unit tests to check ostestr return codes
* Add percent change to duration on subunit-trace output
* Use python APIs to call run modules in ostestr
* Add ostestr options to control parallelism
* Fix the testr init subprocess call
* Improve the arguments for ostestr
* Fix pep8 issues
* Fix return code on test run failure
* Add --pdb flag and fix --no-discover flag
* Add subunit-trace and ostestr
* Initial Cookiecutter Commit

View File

@ -1,49 +0,0 @@
Metadata-Version: 1.1
Name: os-testr
Version: 0.1.0
Summary: A testr wrapper to provide functionality for OpenStack projects
Home-page: http://www.openstack.org/
Author: OpenStack
Author-email: openstack-dev@lists.openstack.org
License: UNKNOWN
Description: ===============================
os-testr
===============================
A testr wrapper to provide functionality for OpenStack projects
* Free software: Apache license
* Documentation: http://docs.openstack.org/developer/os-testr
* Source: http://git.openstack.org/cgit/openstack/os-testr
* Bugs: http://bugs.launchpad.net/os-testr
Features
--------
* ostestr: a testr wrapper that uses subunit-trace for output and builds some
helpful extra functionality around testr
* subunit-trace: an output filter for a subunit stream which provides useful
information about the run
* subunit2html: generates a test results html page from a subunit stream
Release Notes
=============
0.1.0
-----
* First release which includes: ostestr, subunit-trace, and subunit2html
Platform: UNKNOWN
Classifier: Environment :: OpenStack
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4

8
debian/bin/ostestr vendored Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/python
import sys
from os_testr.os_testr import main
if __name__ == "__main__":
sys.exit(main())

8
debian/bin/subunit-trace vendored Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/python
import sys
from os_testr.subunit_trace import main
if __name__ == "__main__":
sys.exit(main())

8
debian/bin/subunit2html vendored Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/python
import sys
from os_testr.subunit2html import main
if __name__ == "__main__":
sys.exit(main())

16
debian/changelog vendored
View File

@ -1,3 +1,19 @@
python-os-testr (0.2.0-1) experimental; urgency=medium
* New upstream release.
* Added myself as uploader.
* Added python{3,}-ddt as build-depends.
* Using git tag based workflow as the package is from OpenStack:
- Dropped upstream tarball artifacts (ChangeLog, AUTHORS, PKG-INFO).
- Fixed debian/gbp.conf
- Added export OSLO_PACKAGE_VERSION=$(VERSION) in debian/rules.
* Added unit tests:
- Added it in debian/rules.
- Added in debian/bin a ostestr thing which is normally generated by pbr.
* Dropped Py3 compat patch applied upstream.
-- Thomas Goirand <zigo@debian.org> Tue, 07 Jul 2015 21:40:51 +0200
python-os-testr (0.1.0-1) unstable; urgency=medium
* Initial release (Closes: #789613).

11
debian/control vendored
View File

@ -3,6 +3,7 @@ Section: python
Priority: optional
Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org>
Uploaders: James Page <james.page@ubuntu.com>,
Thomas Goirand <zigo@debian.org>,
Build-Depends: debhelper (>= 9),
dh-python,
openstack-pkg-tools,
@ -15,6 +16,7 @@ Build-Depends: debhelper (>= 9),
python3-setuptools,
Build-Depends-Indep: python-babel (>= 1.3),
python-coverage (>= 3.6),
python-ddt,
python-hacking,
python-oslosphinx (>= 2.2.0),
python-oslotest (>= 1.2.0),
@ -22,6 +24,7 @@ Build-Depends-Indep: python-babel (>= 1.3),
python-testscenarios (>= 0.4),
python-testtools (>= 0.9.36),
python3-babel (>= 1.3),
python3-ddt,
python3-oslotest (>= 1.2.0),
python3-six (>= 1.9.0),
python3-testscenarios (>= 0.4),
@ -42,8 +45,8 @@ Depends: python-babel (>= 1.3),
subunit (>= 0.0.18),
${misc:Depends},
${python:Depends},
Breaks: python-tempest-lib (<< 0.5.0-2~)
Replaces: python-tempest-lib (<< 0.5.0-2~)
Breaks: python-tempest-lib (<< 0.5.0-2~),
Replaces: python-tempest-lib (<< 0.5.0-2~),
Suggests: python-os-testr-doc,
Description: Utility wrappers for testrepository for OpenStack projects - Python 2.x
A number of small wrappers to support use of testrepository
@ -59,8 +62,8 @@ Depends: python3-babel (>= 1.3),
python3-testtools (>= 0.9.36),
${misc:Depends},
${python3:Depends},
Breaks: python3-tempest-lib (<< 0.5.0-2~)
Replaces: python3-tempest-lib (<< 0.5.0-2~)
Breaks: python3-tempest-lib (<< 0.5.0-2~),
Replaces: python3-tempest-lib (<< 0.5.0-2~),
Suggests: python-os-testr-doc,
Description: Utility wrappers for testrepository for OpenStack projects - Python 3.x
A number of small wrappers to support use of testrepository

5
debian/gbp.conf vendored
View File

@ -1,7 +1,8 @@
[DEFAULT]
upstream-branch = master
debian-branch = debian/liberty
pristine-tar = True
upstream-tag = %(version)s
compression = xz
[buildpackage]
export-dir = ../build-area/

View File

@ -1,51 +0,0 @@
From 4292155e3e546064d10d56a5a0cd1dedc7eb25bd Mon Sep 17 00:00:00 2001
From: James Page <james.page@ubuntu.com>
Date: Tue, 23 Jun 2015 09:47:44 +0100
Subject: [PATCH] Misc Python 3 compatibility fixes
Python 3 renames StringIO -> io. Use six to deal
with this change.
Introduces new test dependency on six for StringIO.
Change-Id: Ia875b7fcbb976599053970ef79ed3f3474626bad
---
os_testr/tests/test_return_codes.py | 6 +++---
test-requirements.txt | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
--- a/os_testr/tests/test_return_codes.py
+++ b/os_testr/tests/test_return_codes.py
@@ -14,13 +14,13 @@
import os
import shutil
-import StringIO
import subprocess
import tempfile
import testtools
from os_testr.tests import base
+from six import StringIO
DEVNULL = open(os.devnull, 'wb')
@@ -47,8 +47,8 @@ class TestReturnCodes(base.TestCase):
shutil.copy('os_testr/tests/files/setup.cfg', self.setup_cfg_file)
shutil.copy('os_testr/tests/files/__init__.py', self.init_file)
- self.stdout = StringIO.StringIO()
- self.stderr = StringIO.StringIO()
+ self.stdout = StringIO()
+ self.stderr = StringIO()
# Change directory, run wrapper and check result
self.addCleanup(os.chdir, os.path.abspath(os.curdir))
os.chdir(self.directory)
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -10,3 +10,4 @@ sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
oslosphinx>=2.2.0 # Apache-2.0
oslotest>=1.2.0 # Apache-2.0
testscenarios>=0.4
+six>=1.9.0

View File

@ -1 +0,0 @@
py3-compat.patch

28
debian/rules vendored
View File

@ -6,6 +6,10 @@ PYTHON3S:=$(shell py3versions -vr)
UPSTREAM_GIT = git://github.com/openstack/os-testr.git
-include /usr/share/openstack-pkg-tools/pkgos.make
export OSLO_PACKAGE_VERSION=$(VERSION)
export PATH+=:$(CURDIR)/debian/bin
%:
dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc
@ -26,6 +30,30 @@ override_dh_install:
mv $(CURDIR)/debian/python-os-testr/usr/bin/subunit2html $(CURDIR)/debian/python-os-testr/usr/bin/python2-subunit2html
mv $(CURDIR)/debian/python3-os-testr/usr/bin/subunit2html $(CURDIR)/debian/python3-os-testr/usr/bin/python3-subunit2html
override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
@echo "===> Running tests"
set -e ; set -x ; for i in 2.7 $(PYTHON3S) ; do \
chmod +x $(CURDIR)/debian/bin/* ; \
for j in $(CURDIR)/debian/bin/* ; do \
echo sed "1 s/.*/#\!\/usr\/bin\/python$$i/" $$j ; \
done ; \
PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
rm -rf .testrepository ; \
testr-python$$PYMAJOR init ; \
TEMP_REZ=`mktemp -t` ; \
PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit | tee $$TEMP_REZ | subunit2pyunit ; \
cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
rm -f $$TEMP_REZ ; \
testr-python$$PYMAJOR slowest ; \
done
set -e ; set -x ; for j in $(CURDIR)/debian/bin/* ; do \
echo sed "1 s/.*/#\!\/usr\/bin\/python/" $$j ; \
done
endif
override_dh_sphinxdoc:
sphinx-build -b html doc/source debian/python-os-testr-doc/usr/share/doc/python-os-testr-doc/html
dh_sphinxdoc -O--buildsystem=python_distutils