mirror of
https://pagure.io/fedora-qa/createhdds.git
synced 2024-11-21 23:03:08 +00:00
reformatted to PEP8
This commit is contained in:
parent
4b77522b03
commit
12a58e84a6
@ -8,166 +8,166 @@ def default_install_cb(flavor):
|
|||||||
return "{0} {1}".format(payload, imagetype)
|
return "{0} {1}".format(payload, imagetype)
|
||||||
|
|
||||||
TESTCASES = {
|
TESTCASES = {
|
||||||
"QA:Testcase_Boot_default_install": {
|
"QA:Testcase_Boot_default_install": {
|
||||||
"name_cb": default_install_cb,
|
"name_cb": default_install_cb,
|
||||||
"section": 'Default boot and install',
|
"section": 'Default boot and install',
|
||||||
"env": "$RUNARCH$",
|
"env": "$RUNARCH$",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_install_to_VirtIO": {
|
"QA:Testcase_install_to_VirtIO": {
|
||||||
"section": "Storage devices",
|
"section": "Storage devices",
|
||||||
"env": "x86",
|
"env": "x86",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_partitioning_guided_empty": {
|
"QA:Testcase_partitioning_guided_empty": {
|
||||||
"section": "Guided storage configuration",
|
"section": "Guided storage configuration",
|
||||||
"env": "x86 BIOS",
|
"env": "x86 BIOS",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_Anaconda_User_Interface_Graphical": {
|
"QA:Testcase_Anaconda_User_Interface_Graphical": {
|
||||||
"section": "User interface",
|
"section": "User interface",
|
||||||
"env": "Result",
|
"env": "Result",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_Anaconda_user_creation": {
|
"QA:Testcase_Anaconda_user_creation": {
|
||||||
"section": "Miscellaneous",
|
"section": "Miscellaneous",
|
||||||
"env": "x86",
|
"env": "x86",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_install_to_PATA": {
|
"QA:Testcase_install_to_PATA": {
|
||||||
"section": "Storage devices",
|
"section": "Storage devices",
|
||||||
"env": "x86",
|
"env": "x86",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_partitioning_guided_delete_all": {
|
"QA:Testcase_partitioning_guided_delete_all": {
|
||||||
"section": "Guided storage configuration",
|
"section": "Guided storage configuration",
|
||||||
"env": "x86 BIOS",
|
"env": "x86 BIOS",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_install_to_SATA": {
|
"QA:Testcase_install_to_SATA": {
|
||||||
"section": "Storage devices",
|
"section": "Storage devices",
|
||||||
"env": "x86",
|
"env": "x86",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_partitioning_guided_multi_select": {
|
"QA:Testcase_partitioning_guided_multi_select": {
|
||||||
"section": "Guided storage configuration",
|
"section": "Guided storage configuration",
|
||||||
"env": "x86 BIOS",
|
"env": "x86 BIOS",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_install_to_SCSI": {
|
"QA:Testcase_install_to_SCSI": {
|
||||||
"section": "Storage devices",
|
"section": "Storage devices",
|
||||||
"env": "x86",
|
"env": "x86",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_Anaconda_updates.img_via_URL": {
|
"QA:Testcase_Anaconda_updates.img_via_URL": {
|
||||||
"section": "Miscellaneous",
|
"section": "Miscellaneous",
|
||||||
"env": "Result",
|
"env": "Result",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_kickstart_user_creation": {
|
"QA:Testcase_kickstart_user_creation": {
|
||||||
"section": "Kickstart",
|
"section": "Kickstart",
|
||||||
"env": "Result",
|
"env": "Result",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_Kickstart_Http_Server_Ks_Cfg": {
|
"QA:Testcase_Kickstart_Http_Server_Ks_Cfg": {
|
||||||
"section": "Kickstart",
|
"section": "Kickstart",
|
||||||
"env": "Result",
|
"env": "Result",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_install_repository_Mirrorlist_graphical": {
|
"QA:Testcase_install_repository_Mirrorlist_graphical": {
|
||||||
"section": "Installation repositories",
|
"section": "Installation repositories",
|
||||||
"env": "Result",
|
"env": "Result",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_install_repository_HTTP/FTP_graphical": {
|
"QA:Testcase_install_repository_HTTP/FTP_graphical": {
|
||||||
"section": "Installation repositories",
|
"section": "Installation repositories",
|
||||||
"env": "Result",
|
"env": "Result",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_install_repository_HTTP/FTP_variation": {
|
"QA:Testcase_install_repository_HTTP/FTP_variation": {
|
||||||
"section": "Installation repositories",
|
"section": "Installation repositories",
|
||||||
"env": "Result",
|
"env": "Result",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_Package_Sets_Minimal_Package_Install": {
|
"QA:Testcase_Package_Sets_Minimal_Package_Install": {
|
||||||
"section": "Package sets",
|
"section": "Package sets",
|
||||||
"env": "$RUNARCH$",
|
"env": "$RUNARCH$",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_partitioning_guided_encrypted": {
|
"QA:Testcase_partitioning_guided_encrypted": {
|
||||||
"section": "Guided storage configuration",
|
"section": "Guided storage configuration",
|
||||||
"env": "x86 BIOS",
|
"env": "x86 BIOS",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_partitioning_guided_delete_partial": {
|
"QA:Testcase_partitioning_guided_delete_partial": {
|
||||||
"section": "Guided storage configuration",
|
"section": "Guided storage configuration",
|
||||||
"env": "x86 BIOS",
|
"env": "x86 BIOS",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_partitioning_guided_free_space": {
|
"QA:Testcase_partitioning_guided_free_space": {
|
||||||
"section": "Guided storage configuration",
|
"section": "Guided storage configuration",
|
||||||
"env": "x86 BIOS",
|
"env": "x86 BIOS",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_partitioning_guided_multi_empty_all": {
|
"QA:Testcase_partitioning_guided_multi_empty_all": {
|
||||||
"section": "Guided storage configuration",
|
"section": "Guided storage configuration",
|
||||||
"env": "x86 BIOS",
|
"env": "x86 BIOS",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_Partitioning_On_Software_RAID": {
|
"QA:Testcase_Partitioning_On_Software_RAID": {
|
||||||
"section": "Custom storage configuration",
|
"section": "Custom storage configuration",
|
||||||
"env": "x86 BIOS",
|
"env": "x86 BIOS",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_Kickstart_Hd_Device_Path_Ks_Cfg": {
|
"QA:Testcase_Kickstart_Hd_Device_Path_Ks_Cfg": {
|
||||||
"section": "Kickstart",
|
"section": "Kickstart",
|
||||||
"env": "Result",
|
"env": "Result",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
"QA:Testcase_upgrade_fedup_cli_previous_minimal": {
|
"QA:Testcase_upgrade_fedup_cli_previous_minimal": {
|
||||||
"section": "Upgrade",
|
"section": "Upgrade",
|
||||||
"env": "x86 BIOS",
|
"env": "x86 BIOS",
|
||||||
"type": "Installation",
|
"type": "Installation",
|
||||||
},
|
},
|
||||||
# "": {
|
# "": {
|
||||||
# "name_cb": callbackfunc # optional, called with 'flavor'
|
# "name_cb": callbackfunc # optional, called with 'flavor'
|
||||||
# "section": "",
|
# "section": "",
|
||||||
# "env": "x86",
|
# "env": "x86",
|
||||||
# "type": "Installation",
|
# "type": "Installation",
|
||||||
# },
|
# },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TESTSUITES = {
|
TESTSUITES = {
|
||||||
"default_install":[
|
"default_install": [
|
||||||
"QA:Testcase_Boot_default_install",
|
"QA:Testcase_Boot_default_install",
|
||||||
"QA:Testcase_install_to_VirtIO",
|
"QA:Testcase_install_to_VirtIO",
|
||||||
"QA:Testcase_partitioning_guided_empty",
|
"QA:Testcase_partitioning_guided_empty",
|
||||||
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
||||||
"QA:Testcase_Anaconda_user_creation",
|
"QA:Testcase_Anaconda_user_creation",
|
||||||
],
|
],
|
||||||
"package_set_minimal":[
|
"package_set_minimal": [
|
||||||
"QA:Testcase_partitioning_guided_empty",
|
"QA:Testcase_partitioning_guided_empty",
|
||||||
"QA:Testcase_install_to_VirtIO",
|
"QA:Testcase_install_to_VirtIO",
|
||||||
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
||||||
"QA:Testcase_Anaconda_user_creation",
|
"QA:Testcase_Anaconda_user_creation",
|
||||||
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
||||||
],
|
],
|
||||||
"server_delete_pata":[
|
"server_delete_pata": [
|
||||||
"QA:Testcase_install_to_PATA",
|
"QA:Testcase_install_to_PATA",
|
||||||
"QA:Testcase_partitioning_guided_delete_all",
|
"QA:Testcase_partitioning_guided_delete_all",
|
||||||
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
||||||
"QA:Testcase_Anaconda_user_creation",
|
"QA:Testcase_Anaconda_user_creation",
|
||||||
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
||||||
],
|
],
|
||||||
"server_sata_multi":[
|
"server_sata_multi": [
|
||||||
"QA:Testcase_install_to_SATA",
|
"QA:Testcase_install_to_SATA",
|
||||||
"QA:Testcase_partitioning_guided_multi_select",
|
"QA:Testcase_partitioning_guided_multi_select",
|
||||||
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
||||||
"QA:Testcase_Anaconda_user_creation",
|
"QA:Testcase_Anaconda_user_creation",
|
||||||
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
||||||
],
|
],
|
||||||
"server_scsi_updates_img":[
|
"server_scsi_updates_img": [
|
||||||
"QA:Testcase_install_to_SCSI",
|
"QA:Testcase_install_to_SCSI",
|
||||||
"QA:Testcase_partitioning_guided_empty",
|
"QA:Testcase_partitioning_guided_empty",
|
||||||
"QA:Testcase_Anaconda_updates.img_via_URL",
|
"QA:Testcase_Anaconda_updates.img_via_URL",
|
||||||
@ -175,13 +175,13 @@ TESTSUITES = {
|
|||||||
"QA:Testcase_Anaconda_user_creation",
|
"QA:Testcase_Anaconda_user_creation",
|
||||||
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
||||||
],
|
],
|
||||||
"server_kickstart_user_creation":[
|
"server_kickstart_user_creation": [
|
||||||
"QA:Testcase_install_to_VirtIO",
|
"QA:Testcase_install_to_VirtIO",
|
||||||
"QA:Testcase_Anaconda_user_creation",
|
"QA:Testcase_Anaconda_user_creation",
|
||||||
"QA:Testcase_kickstart_user_creation",
|
"QA:Testcase_kickstart_user_creation",
|
||||||
"QA:Testcase_Kickstart_Http_Server_Ks_Cfg",
|
"QA:Testcase_Kickstart_Http_Server_Ks_Cfg",
|
||||||
],
|
],
|
||||||
"server_mirrorlist_graphical":[
|
"server_mirrorlist_graphical": [
|
||||||
"QA:Testcase_install_to_VirtIO",
|
"QA:Testcase_install_to_VirtIO",
|
||||||
"QA:Testcase_partitioning_guided_empty",
|
"QA:Testcase_partitioning_guided_empty",
|
||||||
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
||||||
@ -189,7 +189,7 @@ TESTSUITES = {
|
|||||||
"QA:Testcase_install_repository_Mirrorlist_graphical",
|
"QA:Testcase_install_repository_Mirrorlist_graphical",
|
||||||
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
||||||
],
|
],
|
||||||
"server_repository_http_graphical":[
|
"server_repository_http_graphical": [
|
||||||
"QA:Testcase_install_to_VirtIO",
|
"QA:Testcase_install_to_VirtIO",
|
||||||
"QA:Testcase_partitioning_guided_empty",
|
"QA:Testcase_partitioning_guided_empty",
|
||||||
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
||||||
@ -197,7 +197,7 @@ TESTSUITES = {
|
|||||||
"QA:Testcase_install_repository_HTTP/FTP_graphical",
|
"QA:Testcase_install_repository_HTTP/FTP_graphical",
|
||||||
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
||||||
],
|
],
|
||||||
"server_repository_http_variation":[
|
"server_repository_http_variation": [
|
||||||
"QA:Testcase_install_to_VirtIO",
|
"QA:Testcase_install_to_VirtIO",
|
||||||
"QA:Testcase_partitioning_guided_empty",
|
"QA:Testcase_partitioning_guided_empty",
|
||||||
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
||||||
@ -205,7 +205,7 @@ TESTSUITES = {
|
|||||||
"QA:Testcase_install_repository_HTTP/FTP_variation",
|
"QA:Testcase_install_repository_HTTP/FTP_variation",
|
||||||
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
||||||
],
|
],
|
||||||
"server_mirrorlist_http_variation":[
|
"server_mirrorlist_http_variation": [
|
||||||
"QA:Testcase_install_to_VirtIO",
|
"QA:Testcase_install_to_VirtIO",
|
||||||
"QA:Testcase_partitioning_guided_empty",
|
"QA:Testcase_partitioning_guided_empty",
|
||||||
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
"QA:Testcase_Anaconda_User_Interface_Graphical",
|
||||||
@ -249,14 +249,13 @@ TESTSUITES = {
|
|||||||
"QA:Testcase_Anaconda_user_creation",
|
"QA:Testcase_Anaconda_user_creation",
|
||||||
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
"QA:Testcase_Package_Sets_Minimal_Package_Install",
|
||||||
],
|
],
|
||||||
"server_kickstart_hdd":[
|
"server_kickstart_hdd": [
|
||||||
"QA:Testcase_install_to_VirtIO",
|
"QA:Testcase_install_to_VirtIO",
|
||||||
"QA:Testcase_Anaconda_user_creation",
|
"QA:Testcase_Anaconda_user_creation",
|
||||||
"QA:Testcase_kickstart_user_creation",
|
"QA:Testcase_kickstart_user_creation",
|
||||||
"QA:Testcase_Kickstart_Hd_Device_Path_Ks_Cfg",
|
"QA:Testcase_Kickstart_Hd_Device_Path_Ks_Cfg",
|
||||||
],
|
],
|
||||||
"fedup_minimal":[
|
"fedup_minimal": [
|
||||||
"QA:Testcase_upgrade_fedup_cli_previous_minimal",
|
"QA:Testcase_upgrade_fedup_cli_previous_minimal",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ def get_passed_testcases(job_ids, client):
|
|||||||
finished_jobs[job_id] = job_state
|
finished_jobs[job_id] = job_state
|
||||||
del running_jobs[job_id]
|
del running_jobs[job_id]
|
||||||
if running_jobs:
|
if running_jobs:
|
||||||
time.sleep(SLEEPTIME)
|
time.sleep(SLEEPTIME)
|
||||||
logger.info("all jobs finished")
|
logger.info("all jobs finished")
|
||||||
|
|
||||||
passed_testcases = set()
|
passed_testcases = set()
|
||||||
@ -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