f62d428f3b
When a build is reported as lost, it has no start_time, so the code that calculated the run-time for statsd threw an exception. Correct that by only calculating the run time for jobs that have really completed. Add debug lines to onBuild* that would have helped diagnose this. Keep track of the throwaway threads that are used to report LOST builds so that the test suite can more correctly know when the system is settled. Add a test case for a single non-existent post job. Add STATSD_* env variables in tox to make sure that the statsd code paths are executed by tests. Change-Id: I339443cbad7b0858d70e9180d63dfb701b8eaee9 Reviewed-on: https://review.openstack.org/18792 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
28 lines
605 B
INI
28 lines
605 B
INI
[tox]
|
|
envlist = pep8, pyflakes, py27
|
|
|
|
[testenv]
|
|
# Set STATSD env variables so that statsd code paths are tested.
|
|
setenv = STATSD_HOST=localhost
|
|
STATSD_PORT=8125
|
|
deps = -r{toxinidir}/tools/pip-requires
|
|
-r{toxinidir}/tools/test-requires
|
|
commands = nosetests {posargs}
|
|
|
|
[tox:jenkins]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[testenv:pep8]
|
|
deps = pep8==1.3.3
|
|
commands = pep8 --ignore=E125 --repeat --show-source --exclude=.venv,.tox,dist,doc,build .
|
|
|
|
[testenv:cover]
|
|
setenv = NOSE_WITH_COVERAGE=1
|
|
|
|
[testenv:pyflakes]
|
|
deps = pyflakes
|
|
commands = pyflakes zuul setup.py
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|