Skip to content
This repository has been archived by the owner on Feb 18, 2018. It is now read-only.

Commit

Permalink
import all modules, even if there are no tests
Browse files Browse the repository at this point in the history
This makes the coverage estimate a better description of the overall
level of coverage
  • Loading branch information
djmitche committed Dec 20, 2010
1 parent 269aa25 commit 8bb19eb
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 164 deletions.
31 changes: 0 additions & 31 deletions .coveragerc

This file was deleted.

1 change: 1 addition & 0 deletions .coveragerc
31 changes: 31 additions & 0 deletions common/coveragerc
@@ -0,0 +1,31 @@
[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
if runtime.platformType == 'win32'

# 'pass' generally means 'this won't be called'
^ *pass *$

include =
master/*
slave/*

omit =
# omit all of our tests
*/test/*
# templates cause coverage errors
*/templates/*
133 changes: 0 additions & 133 deletions master/buildbot/process/process_twisted.py

This file was deleted.

65 changes: 65 additions & 0 deletions master/buildbot/test/test_extra_coverage.py
@@ -0,0 +1,65 @@
# This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright Buildbot Team Members

# this file imports a number of source files that are not
# included in the coverage because none of the tests import
# them; this results in a more accurate total coverage percent.

modules = [] # for the benefit of pyflakes

from buildbot import buildslave
modules.extend([buildslave])
from buildbot.changes import p4poller, svnpoller
modules.extend([p4poller, svnpoller])
from buildbot.clients import base, sendchange, tryclient
modules.extend([base, sendchange, tryclient])
from buildbot.process import mtrlogobserver, subunitlogobserver
modules.extend([mtrlogobserver, subunitlogobserver])
from buildbot.scripts import checkconfig, logwatcher, reconfig, runner, startup
modules.extend([checkconfig, logwatcher, reconfig, runner, startup])
from buildbot.status import client, html, status_gerrit, status_push
modules.extend([client, html, status_gerrit, status_push])
from buildbot.status import tinderbox, words
modules.extend([tinderbox, words])
from buildbot.status.web import baseweb, build, builder, buildstatus, changes
modules.extend([baseweb, build, builder, buildstatus, changes])
from buildbot.status.web import console, feeds, grid, logs, olpb, root, slaves
modules.extend([console, feeds, grid, logs, olpb, root, slaves])
from buildbot.status.web import status_json, step, tests, waterfall
modules.extend([status_json, step, tests, waterfall])
from buildbot.steps import dummy, master, maxq, python, python_twisted, subunit
modules.extend([dummy, master, maxq, python, python_twisted, subunit])
from buildbot.steps import trigger, vstudio
modules.extend([trigger, vstudio])
from buildbot.steps.package.rpm import rpmbuild, rpmlint, rpmspec
modules.extend([rpmbuild, rpmlint, rpmspec])
from buildbot.util import collections, eventual, loop, monkeypatches
modules.extend([collections, eventual, loop, monkeypatches])

# require gobject
#import buildbot.clients.gtkPanes
#import buildbot.clients.debug

# requires mercurial
#import buildbot.changes.hgbuildbot

# requires libboto
#import buildbot.ec2buildslave

# requires libvirt
#import buildbot.libvirtbuildslave

# requires pycrypto
#import buildbot.manhole
23 changes: 23 additions & 0 deletions slave/buildslave/test/test_extra_coverage.py
@@ -0,0 +1,23 @@
# This file is part of Buildbot. Buildbot is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Copyright Buildbot Team Members

# this file imports a number of source files that are not
# included in the coverage because none of the tests import
# them; this results in a more accurate total coverage percent.

modules = [] # for the benefit of pyflakes

from buildslave.scripts import logwatcher, runner, startup
modules.extend([logwatcher, runner, startup])

0 comments on commit 8bb19eb

Please sign in to comment.