totest-manager: Introduce dryrun option (-D)
Does the entire checking, without actually doing the publishing.
This commit is contained in:
parent
151af25ac1
commit
057518054c
@ -35,8 +35,9 @@ QA_PASSED = 3
|
|||||||
class ToTestBase(object):
|
class ToTestBase(object):
|
||||||
"""Base class to store the basic interface"""
|
"""Base class to store the basic interface"""
|
||||||
|
|
||||||
def __init__(self, project):
|
def __init__(self, project, dryrun):
|
||||||
self.project = project
|
self.project = project
|
||||||
|
self.dryrun = dryrun
|
||||||
self.api = StagingAPI(osc.conf.config['apiurl'], opensuse=project)
|
self.api = StagingAPI(osc.conf.config['apiurl'], opensuse=project)
|
||||||
self.known_failures = self.known_failures_from_dashboard(project)
|
self.known_failures = self.known_failures_from_dashboard(project)
|
||||||
|
|
||||||
@ -337,7 +338,7 @@ class ToTestBase(object):
|
|||||||
self.publish_factory_totest()
|
self.publish_factory_totest()
|
||||||
can_release = False # we have to wait
|
can_release = False # we have to wait
|
||||||
|
|
||||||
if can_release:
|
if can_release and not self.dryrun:
|
||||||
self.update_totest(new_snapshot)
|
self.update_totest(new_snapshot)
|
||||||
|
|
||||||
def known_failures_from_dashboard(self, project):
|
def known_failures_from_dashboard(self, project):
|
||||||
@ -355,8 +356,8 @@ class ToTestFactory(ToTestBase):
|
|||||||
'_product:openSUSE-cd-mini-i586',
|
'_product:openSUSE-cd-mini-i586',
|
||||||
'_product:openSUSE-cd-mini-x86_64']
|
'_product:openSUSE-cd-mini-x86_64']
|
||||||
|
|
||||||
def __init__(self, project):
|
def __init__(self, project, dryrun):
|
||||||
ToTestBase.__init__(self, project)
|
ToTestBase.__init__(self, project, dryrun)
|
||||||
|
|
||||||
def openqa_version(self):
|
def openqa_version(self):
|
||||||
return 'Tumbleweed'
|
return 'Tumbleweed'
|
||||||
@ -401,6 +402,8 @@ if __name__ == '__main__':
|
|||||||
description='Commands to work with staging projects')
|
description='Commands to work with staging projects')
|
||||||
parser.add_argument('project', metavar='P', type=str, default='Factory',
|
parser.add_argument('project', metavar='P', type=str, default='Factory',
|
||||||
help='openSUSE version to make the check (Factory, 13.2)')
|
help='openSUSE version to make the check (Factory, 13.2)')
|
||||||
|
parser.add_argument('-D', '--dryrun', dest="dryrun", action="store_true", default=False,
|
||||||
|
help="dry run: do not actually publish")
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@ -418,5 +421,5 @@ if __name__ == '__main__':
|
|||||||
osc.conf.get_config()
|
osc.conf.get_config()
|
||||||
#osc.conf.config['debug'] = True
|
#osc.conf.config['debug'] = True
|
||||||
|
|
||||||
totest = totest_class[args.project](args.project)
|
totest = totest_class[args.project](args.project, args.dryrun)
|
||||||
totest.totest()
|
totest.totest()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user