public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/, pmstestsuite/output/
Date: Fri,  5 Aug 2011 19:54:52 +0000 (UTC)	[thread overview]
Message-ID: <6f33789cf7ad41482232df90470f9bfd4419d07b.mgorny@gentoo> (raw)

commit:     6f33789cf7ad41482232df90470f9bfd4419d07b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Aug  5 17:15:05 2011 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Aug  5 17:15:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=6f33789c

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='outputmod',
 				help='Output module to use',
 				default='cli')
+		opt.add_option('-O', '--output-file', dest='outputfile',
+				help='File to write output to (may not be used)')
 		opt.add_option('-p', '--package-manager', dest='pm',
 				help='Package manager to use (can be specified multiple times)',
 				action='append', default=[])
@@ -107,7 +109,7 @@ class PMSTestSuiteCLI(object):
 
 		for x in get_output_modules():
 			if x.name == opts.outputmod:
-				self.output = x()
+				self.output = 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
 
+	def __init__(self, output_file = None):
+		pass
+
 	@abstractmethod
 	def __call__(self, results, verbose = False):
 		"""



             reply	other threads:[~2011-08-05 19:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05 19:54 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-03 17:50 [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/, pmstestsuite/output/ Michał Górny
2011-08-05 17:09 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f33789cf7ad41482232df90470f9bfd4419d07b.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox