Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #7988 > unrolled thread
| Started by | Barry Warsaw <barry@debian.org> |
|---|---|
| First post | 2015-12-17 01:20 +0100 |
| Last post | 2015-12-17 16:10 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.debian.maint.python
Help with pytest 2.8.5 Barry Warsaw <barry@debian.org> - 2015-12-17 01:20 +0100
Re: Help with pytest 2.8.5 Piotr Ożarowski <piotr@debian.org> - 2015-12-17 13:20 +0100
Re: Help with pytest 2.8.5 Tristan Seligmann <mithrandi@mithrandi.net> - 2015-12-17 13:50 +0100
Re: Help with pytest 2.8.5 Barry Warsaw <barry@debian.org> - 2015-12-17 16:10 +0100
| From | Barry Warsaw <barry@debian.org> |
|---|---|
| Date | 2015-12-17 01:20 +0100 |
| Subject | Help with pytest 2.8.5 |
| Message-ID | <qGusx-oe-3@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
I've been working on an update to pytest 2.8.5, but I'm stuck and I'm hoping someone here can help. The DPMT git repo is up-to-date with my latest work if you'd like to check the branches out and try to debug the builds. I've made some significant changes to the packaging by switching it to pybuild. That's not the problem though. ;) The problem is that I can't get the test suite to run cleanly during package build. I'm seeing two failures in testing/test_genscript.py which causes the build to fail (or, if I ignore that, prevents pybuild from running the test for Python 3.4 and 3.5). I've tried running the tests via tox and directly invoking the tox.ini command, as you'll see in the current d/rules file. I'm at a loss, but then pytest's output has always boggled me. FWIW, when I run tox in the upstream repo from the 2.8.5 tag, it works just fine. There's something about the build environment that's breaking the test suite, but I can't figure it out. Note too that pytest does not seem to clean up properly after itself, thus the mktemp in d/rules. That at least makes it a little easier to clean up the /tmp directories after an unsucessful sbuild. I also added a DEP-8 test but haven't been able to get that working either. Please, if you want to see pytest 2.8.5 in Debian, give it a look. All help and suggestions welcome. Cheers, -Barry
[toc] | [next] | [standalone]
| From | Piotr Ożarowski <piotr@debian.org> |
|---|---|
| Date | 2015-12-17 13:20 +0100 |
| Message-ID | <qGFHk-7JC-1@gated-at.bofh.it> |
| In reply to | #7988 |
> diff --git a/debian/rules b/debian/rules
> index f473395..3c2f918 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -59,8 +59,9 @@ override_dh_clean:
> override_dh_auto_test:
> ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
> set -ex; \
> + cd /tmp; \
> for py in $(PYVERS) $(PY3VERS); do \
> - PYTHONPATH=$(CURDIR) python$$py -m pytest testing ; \
> + PYTHONPATH=$(CURDIR) python$$py -m pytest $(CURDIR)/testing ; \
PYTHONPATH=$(CURDIR) part looks very suspicious (and error prone)
> done
> endif
I didn't test it but... why is override_dh_auto_test needed at all?
Did you try with:
export PYBUILD_TEST_ARGS={dir}/testing
?
(only "test" or "tests" are copied to build dir by default, you need to
pass path to directory with tests if they're in non standard location)
--
Piotr Ożarowski Debian GNU/Linux Developer
www.ozarowski.pl www.griffith.cc www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
[toc] | [prev] | [next] | [standalone]
| From | Tristan Seligmann <mithrandi@mithrandi.net> |
|---|---|
| Date | 2015-12-17 13:50 +0100 |
| Message-ID | <qGGam-7Vm-25@gated-at.bofh.it> |
| In reply to | #7989 |
[Multipart message — attachments visible in raw view] — view raw
On Thu, 17 Dec 2015, 14:16 Piotr Ożarowski <piotr@debian.org> wrote: > > I didn't test it but... why is override_dh_auto_test needed at all? > Did you try with: > Ah sorry, my diff was against the old debian/rules which didn't use pybuild. However the same problem may happen if pybuild chdir()s to the build directory (I don't remember offhand what it does, and I'm not at my computer).
[toc] | [prev] | [next] | [standalone]
| From | Barry Warsaw <barry@debian.org> |
|---|---|
| Date | 2015-12-17 16:10 +0100 |
| Message-ID | <qGIlP-154-3@gated-at.bofh.it> |
| In reply to | #7989 |
Thanks for the suggestions Tristan & Piotr,
On Dec 17, 2015, at 01:15 PM, Piotr Ożarowski wrote:
>> diff --git a/debian/rules b/debian/rules
>> index f473395..3c2f918 100755
>> --- a/debian/rules
>> +++ b/debian/rules
>> @@ -59,8 +59,9 @@ override_dh_clean:
>> override_dh_auto_test:
>> ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
>> set -ex; \
>> + cd /tmp; \
>> for py in $(PYVERS) $(PY3VERS); do \
>> - PYTHONPATH=$(CURDIR) python$$py -m pytest testing ; \
>> + PYTHONPATH=$(CURDIR) python$$py -m pytest $(CURDIR)/testing ; \
>
>PYTHONPATH=$(CURDIR) part looks very suspicious (and error prone)
>
>> done
>> endif
>
>I didn't test it but... why is override_dh_auto_test needed at all?
>Did you try with:
>
> export PYBUILD_TEST_ARGS={dir}/testing
>
>?
>(only "test" or "tests" are copied to build dir by default, you need to
>pass path to directory with tests if they're in non standard location)
I did try various riffs on this theme, but am still unable to get
tests_genscript.py to pass. FWIW, here's the current pybuild-based rule:
# 2015-12-16 barry@debian.org: Because pytest does not clean up after itself,
# use a custom temporary directory (which is easier to clean up manually,
# e.g. in an sbuild).
override_dh_auto_test:
TMPDIR=`mktemp -t -d pytest.XXXXXXXXXX` \
PYBUILD_SYSTEM=custom \
PYTHONPATH=$$(CURDIR) \
PYBUILD_TEST_ARGS="{interpreter} -m pytest --lsof -rfsxX {dir}/testing" dh_auto_test
Don't worry about the style of the above unless it's material to the failure.
As I mentioned, I've tried lots of different variations. None allow
test_genscript.py to pass. (Setting or not PYTHONPATH also makes no
difference.)
I believe genscript is deprecated in pytest, so I'm seriously considering just
disabling this test for now and moving on.
Cheers,
-Barry
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.maint.python
csiph-web