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: Tue, 31 May 2011 21:06:56
Message-Id: 4ec2cf8922a03e3654fc0d18f89f2385a763bff2.mgorny@gentoo
1 commit: 4ec2cf8922a03e3654fc0d18f89f2385a763bff2
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 21:01:27 2011 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 21:01:27 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=4ec2cf89
7
8 Fix grabbing CPV for tests.
9
10 ---
11 PMSTestSuite/library/case.py | 5 +++++
12 PMSTestSuite/testrunner.py | 4 ++--
13 2 files changed, 7 insertions(+), 2 deletions(-)
14
15 diff --git a/PMSTestSuite/library/case.py b/PMSTestSuite/library/case.py
16 index f02a5e1..8d70f93 100644
17 --- a/PMSTestSuite/library/case.py
18 +++ b/PMSTestSuite/library/case.py
19 @@ -68,6 +68,11 @@ class EbuildTestCase(TestCase):
20 kwargs['eapi'] = eapi
21 yield cls(*args, **kwargs)
22
23 + @property
24 + def cpv(self):
25 + """ Return CPV for the test. """
26 + return 'pms-test/%s' % self.p
27 +
28 def __init__(self, eapi):
29 """ Instiantate the test case for a particular EAPI. """
30 self.eapi = eapi
31
32 diff --git a/PMSTestSuite/testrunner.py b/PMSTestSuite/testrunner.py
33 index f642aaa..ced3b3c 100644
34 --- a/PMSTestSuite/testrunner.py
35 +++ b/PMSTestSuite/testrunner.py
36 @@ -8,7 +8,7 @@ class TestRunnerCLI(EbuildGenCLI):
37
38 cpvs = frozenset(self.pm.lookup_vardb(self.cpvs))
39 for t in self.test_library:
40 - res = t.check_result(t.p in cpvs)
41 + res = t.check_result(t.cpv in cpvs)
42 if not res:
43 failed.append(t)
44
45 @@ -30,7 +30,7 @@ class TestRunnerCLI(EbuildGenCLI):
46 return ret
47
48 self.pm.append_repository(self.repository)
49 - self.cpvs = [t.p for t in self.test_library]
50 + self.cpvs = [t.cpv for t in self.test_library]
51
52 installedcpvs = self.pm.lookup_vardb(self.cpvs)
53 if installedcpvs: