From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QpNtv-00037I-OW for garchives@archives.gentoo.org; Fri, 05 Aug 2011 17:09:35 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 426A921C1E5; Fri, 5 Aug 2011 17:09:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 1824C21C1E5 for ; Fri, 5 Aug 2011 17:09:28 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 97C711B4022 for ; Fri, 5 Aug 2011 17:09:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 919C88004B for ; Fri, 5 Aug 2011 17:09:26 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <3e43671668bfc8e41f0f0c7e0b2089f66b97e8a2.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: pmstestsuite/cli.py X-VCS-Directories: pmstestsuite/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 3e43671668bfc8e41f0f0c7e0b2089f66b97e8a2 Date: Fri, 5 Aug 2011 17:09:26 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: f151cc87178d773d6e2e6ac9aa0791af commit: 3e43671668bfc8e41f0f0c7e0b2089f66b97e8a2 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Fri Aug 5 15:49:17 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Fri Aug 5 15:49:17 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D3e436716 Move test preparation into .prepare(). --- 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() =20 + 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) =20 @@ -236,15 +246,7 @@ class PMSTestSuiteCLI(object): =20 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() =20 self.ret =3D 1 self.loop =3D gobject.MainLoop()