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/pm/, PMSTestSuite/
Date: Sun, 29 May 2011 18:57:35
Message-Id: f4c735ce8d3e988b97ea258f514135d77b973d1a.mgorny@gentoo
1 commit: f4c735ce8d3e988b97ea258f514135d77b973d1a
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 29 18:39:43 2011 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun May 29 18:39:43 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=f4c735ce
7
8 Enumerate the atom list and call PM.
9
10 ---
11 PMSTestSuite/pm/__init__.py | 10 ++++++++++
12 PMSTestSuite/testrunner.py | 4 ++++
13 2 files changed, 14 insertions(+), 0 deletions(-)
14
15 diff --git a/PMSTestSuite/pm/__init__.py b/PMSTestSuite/pm/__init__.py
16 index 80e698b..08b7c25 100644
17 --- a/PMSTestSuite/pm/__init__.py
18 +++ b/PMSTestSuite/pm/__init__.py
19 @@ -42,6 +42,16 @@ class PackageManager(object):
20 """ Regenerate Manifests in given <paths> (should be iterable). """
21 raise NotImplementedError('Please override the remanifest() method.')
22
23 + def merge(self, atoms):
24 + """
25 + Run PM to merge <atoms>.
26 +
27 + Returns True if PM run successfully, False otherwise. Please note that
28 + this return code may not have anything to do with ebuilds actually
29 + getting merged.
30 + """
31 + raise NotImplementedError('Please override the merge() method.')
32 +
33 def get_package_managers():
34 """ Return the list of supported Package Managers. """
35
36
37 diff --git a/PMSTestSuite/testrunner.py b/PMSTestSuite/testrunner.py
38 index b3948ee..d7ca5c5 100644
39 --- a/PMSTestSuite/testrunner.py
40 +++ b/PMSTestSuite/testrunner.py
41 @@ -7,4 +7,8 @@ class TestRunnerCLI(EbuildGenCLI):
42 if ret != 0:
43 return ret
44
45 + atoms = ['=%s' % t.p for t in self.test_library]
46 + print('-> Running PM...')
47 + self.pm.merge(atoms)
48 +
49 return 0