make check still brittle with doctests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
High
|
Unassigned | ||
Breezy |
Fix Released
|
High
|
Jelmer Vernooij |
Bug Description
We broke pqm again in a way that let it accept any submission.
The fix for https:/
$(PYTHON) -Werror -O ./bzr selftest --subunit $(tests)
Which works for all tests except for... doctests.
The case at hand led to selftest.log containing only:
**failed to get doctest for: bzrlib.pyutils
line 6 of the doctest for bzrlib.
which came from:
"""Determine the 'parent' of a given dotted module name and (optional)
member name.
Typical use is::
>>> parent_mod, parent_member, final_attr = calc_parent_name(
... module_name, member_name) # doctest: +SKIP
>>> parent_obj = get_named_
... # doctest: +SKIP
The idea is that ``getattr(
get_
:return: (module_name, member_name, final_attr) tuple.
"""
I'm landing a fix to comment this out to fix pqm willingness to
merge anything :)
Related branches
- Martin Packman: Approve
-
Diff: 286 lines (+82/-34)7 files modified.testr.conf (+1/-1)
Makefile (+4/-4)
breezy/builtins.py (+21/-10)
breezy/tests/__init__.py (+34/-9)
breezy/tests/blackbox/test_selftest.py (+9/-4)
breezy/tests/test_selftest.py (+8/-6)
doc/en/release-notes/brz-3.0.txt (+5/-0)
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → High |
summary: |
- make check still brittle + make check still brittle with doctests |
tags: | added: selftest |
Changed in brz: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Jelmer Vernooij (jelmer) |
milestone: | none → 3.0.0 |
tags: | added: su subunit |
Changed in brz: | |
status: | In Progress → Fix Committed |
Changed in brz: | |
status: | Fix Committed → Fix Released |
I was wondering if this is still active, but I think it is. The makefile has
check-nodocs: extensions
set -e
# Generate a stream for PQM to watch.
-$(RM) -f selftest.log
$(PYTHON) -Werror -O ./bzr selftest --subunit $(tests) | tee selftest.log
# An empty log file should catch errors in the $(PYTHON)
# command above (the '|' swallow any errors since 'make'
# sees the 'tee' exit code for the whole line
if [ ! -s selftest.log ] ; then exit 1 ; fi
# Check that there were no errors reported.
subunit-stats < selftest.log
There are a couple of problems with this:
* The shell will ignore non-zero return codes from everything but the last command in a pipeline. (You can tell zsh to do otherwise, but I don't think there's any portable way.) So anything that causes bzr to abort won't be seen.
* The subunit file having something in it is no guarantee that all the tests ran to completion.
If this bites us again I would be strongly inclined to just take out subunit until we have a way to run it that's inherently safe.