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 1QpQU2-0007Qi-0D for garchives@archives.gentoo.org; Fri, 05 Aug 2011 19:55:02 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D529221C169; Fri, 5 Aug 2011 19:54:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 91A6521C0A6 for ; Fri, 5 Aug 2011 19:54:53 +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 ECB4C1B401D for ; Fri, 5 Aug 2011 19:54:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 45A6A80040 for ; Fri, 5 Aug 2011 19:54:52 +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: <6f33789cf7ad41482232df90470f9bfd4419d07b.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/, pmstestsuite/output/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: pmstestsuite/cli.py pmstestsuite/output/__init__.py X-VCS-Directories: pmstestsuite/ pmstestsuite/output/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 6f33789cf7ad41482232df90470f9bfd4419d07b Date: Fri, 5 Aug 2011 19:54:52 +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: 589098cb26bb6f674092f1e5b269a640 commit: 6f33789cf7ad41482232df90470f9bfd4419d07b Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Fri Aug 5 17:15:05 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Fri Aug 5 17:15:05 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D6f33789c Support --output-file arg. --- pmstestsuite/cli.py | 4 +++- pmstestsuite/output/__init__.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/pmstestsuite/cli.py b/pmstestsuite/cli.py index f315b47..b046578 100644 --- a/pmstestsuite/cli.py +++ b/pmstestsuite/cli.py @@ -60,6 +60,8 @@ class PMSTestSuiteCLI(object): opt.add_option('-o', '--output-module', dest=3D'outputmod', help=3D'Output module to use', default=3D'cli') + opt.add_option('-O', '--output-file', dest=3D'outputfile', + help=3D'File to write output to (may not be used)') opt.add_option('-p', '--package-manager', dest=3D'pm', help=3D'Package manager to use (can be specified multiple times)', action=3D'append', default=3D[]) @@ -107,7 +109,7 @@ class PMSTestSuiteCLI(object): =20 for x in get_output_modules(): if x.name =3D=3D opts.outputmod: - self.output =3D x() + self.output =3D x(opts.outputfile) break else: opt.error('Output module not available: %s' % opts.outputmod) diff --git a/pmstestsuite/output/__init__.py b/pmstestsuite/output/__init= __.py index 5cdb23e..cef7ab8 100644 --- a/pmstestsuite/output/__init__.py +++ b/pmstestsuite/output/__init__.py @@ -57,6 +57,9 @@ class OutputModule(ABCObject): """ pass =20 + def __init__(self, output_file =3D None): + pass + @abstractmethod def __call__(self, results, verbose =3D False): """