Run tests in parallel.

This commit is contained in:
Bastian Kleineidam 2013-02-10 18:24:05 +01:00
parent 1c24fca199
commit f96e6d2b3e
2 changed files with 7 additions and 5 deletions

View file

@ -16,12 +16,10 @@ DEBORIGFILE:=$(DEBUILDDIR)/$(LAPPNAME)_$(VERSION).orig.tar.gz
DEBPACKAGEDIR:=$(DEBUILDDIR)/$(LAPPNAME)-$(VERSION)
PY_FILES_DIRS := dosage dosagelib scripts tests
PY2APPOPTS ?=
# Default pytest options:
# Do not use parallel testing with -n: it makes some tests fail since
# some web servers have limits on the number of parallel connections.
# Also note that using -n silently swallows test creation exceptions like
# Default pytest options
# Note that using -n silently swallows test creation exceptions like
# import errors.
PYTESTOPTS?=--resultlog=testresults.txt --tb=short --durations=0
PYTESTOPTS?=--resultlog=testresults.txt --tb=short --durations=0 -n4
CHMODMINUSMINUS:=--
# directory or file with tests to run
TESTS ?= tests

View file

@ -97,6 +97,10 @@ def generate_comic_testers():
scrapers = scraper.get_scrapers()
for scraperclass in scrapers:
name = 'Test'+scraperclass.__name__
# The DrunkDuck webpage has a *lot* of false positives.
# Skip them for now.
if name.startswith("TestDrunkDuck"):
continue
g[name] = make_comic_tester(name, scraperclass=scraperclass)