diff options
author | 2011-08-05 17:49:17 +0200 | |
---|---|---|
committer | 2011-08-05 17:49:17 +0200 | |
commit | 3e43671668bfc8e41f0f0c7e0b2089f66b97e8a2 (patch) | |
tree | 21341eeb13efac1b1d29167126ec27f145345e58 | |
parent | Support doing the Manifests with multiple PMs. (diff) | |
download | pms-test-suite-3e43671668bfc8e41f0f0c7e0b2089f66b97e8a2.tar.gz pms-test-suite-3e43671668bfc8e41f0f0c7e0b2089f66b97e8a2.tar.bz2 pms-test-suite-3e43671668bfc8e41f0f0c7e0b2089f66b97e8a2.zip |
Move test preparation into .prepare().
-rw-r--r-- | pmstestsuite/cli.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/pmstestsuite/cli.py b/pmstestsuite/cli.py index 607d3ce..a042a7e 100644 --- a/pmstestsuite/cli.py +++ b/pmstestsuite/cli.py @@ -204,6 +204,16 @@ class PMSTestSuiteCLI(object): return self.start_pm() + def prepare(self): + for t in self.test_library: + t.clean(self.pm) + + if self.pm.has_pending_actions: + print('-> Unmerging already-merged test ebuilds...') + self.pm.commit(self.pre_unmerge_done) + else: + self.start_pm() + def main(self, argv): self._start(*argv) @@ -236,15 +246,7 @@ class PMSTestSuiteCLI(object): if len(self.pms) > 1: raise NotImplementedError('Using multiple PMs not implemented yet') - - for t in self.test_library: - t.clean(self.pm) - - if self.pm.has_pending_actions: - print('-> Unmerging already-merged test ebuilds...') - self.pm.commit(self.pre_unmerge_done) - else: - self.start_pm() + self.prepare() self.ret = 1 self.loop = gobject.MainLoop() |