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 1QXGH1-00081x-3m for garchives@archives.gentoo.org; Thu, 16 Jun 2011 17:22:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8E1B91C0B2; Thu, 16 Jun 2011 17:22:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5C39E1C0B5 for ; Thu, 16 Jun 2011 17:22:23 +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 D9E5D1B4028 for ; Thu, 16 Jun 2011 17:22:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 12C9F8003C for ; Thu, 16 Jun 2011 17:22:22 +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: <7ed9c0b50bb9d4e626cc0c781699bff413584ff5.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: PMSTestSuite/pm/, PMSTestSuite/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: PMSTestSuite/cli.py PMSTestSuite/pm/__init__.py PMSTestSuite/pm/pkgcorepm.py X-VCS-Directories: PMSTestSuite/pm/ PMSTestSuite/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 7ed9c0b50bb9d4e626cc0c781699bff413584ff5 Date: Thu, 16 Jun 2011 17:22:22 +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: c648ce2e99d2355b98fceb6f5815f88f commit: 7ed9c0b50bb9d4e626cc0c781699bff413584ff5 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Thu Jun 16 17:05:03 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Thu Jun 16 17:05:03 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D7ed9c0b5 Keep package limit in PackageManager instance. --- PMSTestSuite/cli.py | 5 ++--- PMSTestSuite/pm/__init__.py | 2 ++ PMSTestSuite/pm/pkgcorepm.py | 8 ++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/PMSTestSuite/cli.py b/PMSTestSuite/cli.py index 89a498a..6975bfe 100644 --- a/PMSTestSuite/cli.py +++ b/PMSTestSuite/cli.py @@ -102,7 +102,7 @@ class PMSTestSuiteCLI(object): except (ImportError, TypeError) as e: opt.error('Test library load failed: %s' % e) =20 - self.limit_packages =3D opts.limit_pkgs + self.pm.package_limit =3D opts.limit_pkgs =20 def tests_done(self): self.merged_pkgs =3D frozenset(self.pm.lookup_vardb(self.cpvs)) @@ -176,8 +176,7 @@ class PMSTestSuiteCLI(object): self.cpvs =3D [t.cpv for t in self.test_library] =20 self.package_queue =3D list(self.cpvs) - if not self.pm.failure_nonfatal: - self.limit_packages =3D 1 + self.limit_packages =3D self.pm.package_limit =20 installedcpvs =3D self.pm.lookup_vardb(self.cpvs) if installedcpvs: diff --git a/PMSTestSuite/pm/__init__.py b/PMSTestSuite/pm/__init__.py index c066890..588f308 100644 --- a/PMSTestSuite/pm/__init__.py +++ b/PMSTestSuite/pm/__init__.py @@ -24,6 +24,8 @@ class PackageManager(object): pm_options =3D [] repo_paths =3D [] pkg_queue =3D [] + package_limit =3D None + _current_op =3D None =20 @property diff --git a/PMSTestSuite/pm/pkgcorepm.py b/PMSTestSuite/pm/pkgcorepm.py index a29f1bd..ba1b1a0 100644 --- a/PMSTestSuite/pm/pkgcorepm.py +++ b/PMSTestSuite/pm/pkgcorepm.py @@ -40,6 +40,14 @@ class PkgCorePM(PortagePM): ret &=3D os.access(prog, os.X_OK) return ret =20 + @property + def package_limit(self): + return 1 + + @package_limit.setter + def package_limit(self, val): + pass + def spawn_pmerge(self, cpvs, opts =3D []): return subprocess.Popen([self.pmerge_path] + self.common_pmerge_opts + opts + self.pm_options