aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-08-20 08:03:29 +0200
committerMichał Górny <mgorny@gentoo.org>2011-08-20 08:03:29 +0200
commit13a62d774130c0e485572da2f4e1ddc2bdc33937 (patch)
tree6748330d42120817da29ef0133d402b9e313f415
parentClean up whitespace in HTML output. (diff)
downloadpms-test-suite-13a62d774130c0e485572da2f4e1ddc2bdc33937.tar.gz
pms-test-suite-13a62d774130c0e485572da2f4e1ddc2bdc33937.tar.bz2
pms-test-suite-13a62d774130c0e485572da2f4e1ddc2bdc33937.zip
Add --create-repo-only option.
-rw-r--r--pmstestsuite/cli.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/pmstestsuite/cli.py b/pmstestsuite/cli.py
index 510d6d5..8262427 100644
--- a/pmstestsuite/cli.py
+++ b/pmstestsuite/cli.py
@@ -49,6 +49,9 @@ class PMSTestSuiteCLI(object):
setattr(parser.values, 'pmopts', {})
parser.values.pmopts[p] = optval
+ opt.add_option('-C', '--create-repo-only', dest='create_repo_only',
+ help='Create ebuild repository only',
+ action='store_true', default=False)
opt.add_option('-l', '--library', dest='library_name',
help='Test library to use (default: standard)',
default='standard')
@@ -110,12 +113,13 @@ class PMSTestSuiteCLI(object):
if opts.repo_path and opts.repo_name:
opt.error('--repository-path and --repository-name are mutually exclusive')
- for x in get_output_modules():
- if x.name == opts.outputmod:
- self.output = x(opts.outputfile)
- break
- else:
- opt.error('Output module not available: %s' % opts.outputmod)
+ if not opts.create_repo_only:
+ for x in get_output_modules():
+ if x.name == opts.outputmod:
+ self.output = x(opts.outputfile)
+ break
+ else:
+ opt.error('Output module not available: %s' % opts.outputmod)
pmset = set(opts.pm)
pms = []
@@ -159,6 +163,7 @@ class PMSTestSuiteCLI(object):
for pm in self.pms:
pm.package_limit = opts.limit_pkgs
+ self.create_repo_only = opts.create_repo_only
self.update_manifests = not opts.no_manifests
self.verbose = opts.verbose
@@ -269,6 +274,9 @@ class PMSTestSuiteCLI(object):
print('No PM was able to do the Manifests, failing.')
return 1
+ if self.create_repo_only:
+ return 0
+
self.pm_iter = iter(self.pms)
self.results = {}
self.prepare(first = True)