[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2757: improve deprecation-warning builder
Tahoe-LAFS
trac at tahoe-lafs.org
Mon Mar 28 01:13:56 UTC 2016
#2757: improve deprecation-warning builder
--------------------------------+---------------------------
Reporter: warner | Owner:
Type: task | Status: new
Priority: minor | Milestone: undecided
Component: dev-infrastructure | Version: 1.10.2
Keywords: | Launchpad Bug:
--------------------------------+---------------------------
We have a buildbot builder that runs tests with
`PYTHONWARNINGS=default::DeprecationWarning` (you can do the same at home
by running `tox -e deprecations`). But unfortunately it's not currently
parsing the output for the `DeprecationWarning: ` lines, so to find out if
there are any problems, you have to look at the logfile and scan for red
stderr messages.
My preferred fix would be for the tox `deprecations` environment to run
some shell scripts, to `tee` the logfile into a separate file, `grep` for
the warnings, and dump the results in a new `deprecations.log` file. Then
the buildbot could add that as a "logfile", and flunk the step unless it's
empty. Unfortunately it seems that `tox` really wants to encourage cross-
platform compatibility, by not running the commands in a shell: I tried
`trial allmydata | tee -a log.out` and got a complaint from trial that `|`
wasn't a valid test module to run.
We could change this to `make test-deprecations`, which might provoke a
tox complaint (since it doesn't remember installing `make`), but might
still work. Or we could write some python tooling that installs a command
into the virtualenv's `bin/` that does the same thing.
I kind of want `tox` to do this, because then it's easier to run at home.
I think I want it to dump the list of deprecations at the end of the test
run (unless there are a lot of them, then maybe dumping the count and the
name of the file would be enough). It could also exit with rc!=0 if there
were any warnings.
If we can't get tox to drive this, we could find a way to change the
buildbot to grep stderr (and not just stdout) for the messages. I think it
used to do this, but something changed in buildbot in the last few years
(maybe related to "new-style" build steps, and the emulation code that
provides support for old-style ones), and now the regexp is only being
given stdout lines, not stderr.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2757>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list