mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
NOTICK Python 3 compat, ENM version name, skip closed tests (#4046)
This commit is contained in:
parent
b8e88232b4
commit
d1adb09ca9
@ -5,7 +5,7 @@ import sys, traceback
|
||||
# {{{ Representation of a command-line program
|
||||
class Program:
|
||||
|
||||
# Create a new command-line program represenation, provided an optional name and description
|
||||
# Create a new command-line program representation, provided an optional name and description
|
||||
def __init__(self, name=None, description=None):
|
||||
self.parser = ArgumentParser(name, description=description)
|
||||
self.subparsers = self.parser.add_subparsers(title='commands')
|
||||
@ -39,7 +39,10 @@ class Program:
|
||||
t, exception, tb = sys.exc_info()
|
||||
self.parser.error('{}\n\n{}'.format(error.message, '\n'.join(traceback.format_tb(tb))))
|
||||
else:
|
||||
self.parser.error(error.message)
|
||||
try:
|
||||
self.parser.error(error.message)
|
||||
except AttributeError:
|
||||
self.parser.error(str(error))
|
||||
# }}}
|
||||
|
||||
# {{{ Representation of a sub-command of a command-line program
|
||||
|
@ -3,6 +3,13 @@ from jira import JIRA
|
||||
from jira.exceptions import JIRAError
|
||||
# }}}
|
||||
|
||||
# {{{ Python 2 and 3 interoperability
|
||||
try:
|
||||
unicode('')
|
||||
except NameError:
|
||||
unicode = str
|
||||
# }}}
|
||||
|
||||
# {{{ Class for interacting with a hosted JIRA system
|
||||
class Jira:
|
||||
|
||||
|
@ -36,7 +36,8 @@ except:
|
||||
product_map = {
|
||||
'OS' : 'Corda',
|
||||
'ENT' : 'Corda Enterprise',
|
||||
'NS' : 'Corda Network Services',
|
||||
'NS' : 'ENM',
|
||||
'ENM' : 'ENM',
|
||||
'TEST' : 'Corda', # for demo and test purposes
|
||||
}
|
||||
# }}}
|
||||
@ -235,10 +236,15 @@ def create_release_candidate(args):
|
||||
print()
|
||||
has_tests = False
|
||||
for issue in jira.search(QUERY_LIST_TEST_INSTANCES, args.PRODUCT, version):
|
||||
print(u' - {} {}'.format(blue(issue.key), issue.fields.summary))
|
||||
test_status = issue.fields.status['name']
|
||||
print(u' - {} {} ({})'.format(blue(issue.key), issue.fields.summary, test_status))
|
||||
epic_field = jira.custom_fields_by_name['Epic Link']
|
||||
epic = issue.fields[epic_field] if epic_field in issue.fields.to_dict() else ''
|
||||
labels = issue.fields.labels + [epic]
|
||||
if test_status in ['Pass', 'Fail', 'Descope']:
|
||||
print(u' {} - Parent test is marked as {}'.format(yellow('SKIPPED'), test_status))
|
||||
print()
|
||||
continue
|
||||
print()
|
||||
has_tests = True
|
||||
print(u' - Creating test run ticket for release candidate {} ...'.format(yellow('RC{:02d}'.format(CANDIDATE))))
|
||||
|
Loading…
Reference in New Issue
Block a user