Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/library/, pmstestsuite/
Date: Wed, 29 Jun 2011 17:52:58
Message-Id: 0fe0c4190597136b01be3700eea3c890ec1ff0c3.mgorny@gentoo
1 commit: 0fe0c4190597136b01be3700eea3c890ec1ff0c3
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 29 17:40:31 2011 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 17:40:31 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=0fe0c419
7
8 Support enabling thorough mode for a library.
9
10 ---
11 pmstestsuite/cli.py | 6 +++++-
12 pmstestsuite/library/__init__.py | 3 ++-
13 2 files changed, 7 insertions(+), 2 deletions(-)
14
15 diff --git a/pmstestsuite/cli.py b/pmstestsuite/cli.py
16 index 707f494..4d309f8 100644
17 --- a/pmstestsuite/cli.py
18 +++ b/pmstestsuite/cli.py
19 @@ -57,6 +57,9 @@ class PMSTestSuiteCLI(object):
20 opt.add_option('-t', '--tests', dest='tests',
21 help='Limit the tests to be run (may be specified multiple times)',
22 action='append', default=[])
23 + opt.add_option('-T', '--thorough', dest='thorough',
24 + help='Run tests thoroughly (i.e. in all possible variants)',
25 + action='store_true', default=False)
26
27 self.optparser = opt
28
29 @@ -99,7 +102,8 @@ class PMSTestSuiteCLI(object):
30 opt.error('Repository open failed: %s' % e)
31
32 try:
33 - self.test_library = load_library(opts.library_name)
34 + self.test_library = load_library(opts.library_name,
35 + thorough = opts.thorough)
36 except (ImportError, TypeError) as e:
37 opt.error('Test library load failed: %s' % e)
38
39
40 diff --git a/pmstestsuite/library/__init__.py b/pmstestsuite/library/__init__.py
41 index a638b62..6499e3f 100644
42 --- a/pmstestsuite/library/__init__.py
43 +++ b/pmstestsuite/library/__init__.py
44 @@ -60,8 +60,9 @@ class TestLibrary(object):
45
46 return len(self.tests)
47
48 - def __init__(self, modname):
49 + def __init__(self, modname, thorough = False):
50 self.modname = modname
51 + self.thorough = thorough
52
53 def limit_tests(self, limitations):
54 if self.tests is not None: