mirror of
https://github.com/rocky-linux/createhdds.git
synced 2024-12-22 18:18:32 +00:00
reformatted to PEP8
This commit is contained in:
parent
4b77522b03
commit
12a58e84a6
@ -259,4 +259,3 @@ TESTSUITES = {
|
|||||||
"QA:Testcase_upgrade_fedup_cli_previous_minimal",
|
"QA:Testcase_upgrade_fedup_cli_previous_minimal",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,23 +43,25 @@ def get_passed_testcases(job_ids, client):
|
|||||||
flavor = job['settings']['FLAVOR']
|
flavor = job['settings']['FLAVOR']
|
||||||
|
|
||||||
for testcase in conf_test_suites.TESTSUITES[testsuite]:
|
for testcase in conf_test_suites.TESTSUITES[testsuite]:
|
||||||
# each 'testsuite' is a list using testcase names to indicate which Wikitcms tests have
|
# each 'testsuite' is a list using testcase names to indicate which Wikitcms tests
|
||||||
# passed if this job passes. Each testcase name is the name of a dict in the TESTCASES
|
# have passed if this job passes. Each testcase name is the name of a dict in the
|
||||||
# dict-of-dicts which more precisely identifies the 'test instance' (when there is more
|
# TESTCASES dict-of-dicts which more precisely identifies the 'test instance' (when
|
||||||
# than one for a testcase) and environment for which the result should be filed.
|
# there is more than one for a testcase) and environment for which the result
|
||||||
|
# should be filed.
|
||||||
uniqueres = conf_test_suites.TESTCASES[testcase]
|
uniqueres = conf_test_suites.TESTCASES[testcase]
|
||||||
testname = ''
|
testname = ''
|
||||||
if 'name_cb' in uniqueres:
|
if 'name_cb' in uniqueres:
|
||||||
testname = uniqueres['name_cb'](flavor)
|
testname = uniqueres['name_cb'](flavor)
|
||||||
env = arch if uniqueres['env'] == '$RUNARCH$' else uniqueres['env']
|
env = arch if uniqueres['env'] == '$RUNARCH$' else uniqueres['env']
|
||||||
result = ResTuple(
|
result = ResTuple(
|
||||||
testtype=uniqueres['type'], release=release, milestone=milestone, compose=compose,
|
testtype=uniqueres['type'], release=release, milestone=milestone,
|
||||||
testcase=testcase, section=uniqueres['section'], testname=testname, env=env, status='pass',
|
compose=compose, testcase=testcase, section=uniqueres['section'],
|
||||||
bot=True)
|
testname=testname, env=env, status='pass', bot=True)
|
||||||
passed_testcases.add(result)
|
passed_testcases.add(result)
|
||||||
|
|
||||||
return sorted(list(passed_testcases), key=attrgetter('testcase'))
|
return sorted(list(passed_testcases), key=attrgetter('testcase'))
|
||||||
|
|
||||||
|
|
||||||
def report_results(job_ids, client, verbose=False, report=True):
|
def report_results(job_ids, client, verbose=False, report=True):
|
||||||
passed_testcases = get_passed_testcases(job_ids, client)
|
passed_testcases = get_passed_testcases(job_ids, client)
|
||||||
if verbose:
|
if verbose:
|
||||||
@ -91,7 +93,8 @@ def report_results(job_ids, client, verbose=False, report=True):
|
|||||||
logger.warning("no reporting is done")
|
logger.warning("no reporting is done")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser(description="Evaluate per-testcase results from OpenQA job runs")
|
parser = argparse.ArgumentParser(description="Evaluate per-testcase results from OpenQA job "
|
||||||
|
"runs")
|
||||||
parser.add_argument('jobs', type=int, nargs='+')
|
parser.add_argument('jobs', type=int, nargs='+')
|
||||||
parser.add_argument('--report', default=False, action='store_true')
|
parser.add_argument('--report', default=False, action='store_true')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user