Skip to content
This repository was archived by the owner on Apr 30, 2020. It is now read-only.

Commit 1081859

Browse files
kparalhroncok
authored andcommitted
report tested arches
When creating the ResultsYaml format, later to be reported to ResultsDB, list all the architectures that have been tested by this test run. This allows people+systems to see what was tested and what was not, and allows to query whether a specific architecture has a result or not.
1 parent 82db17a commit 1081859

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ __pycache__
1111
.cache
1212
*.egg-info
1313
tests.retry
14+
/.pytest_cache/

python_versions_check.py

+11-6
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
def run(koji_build, workdir='.', artifactsdir='artifacts',
31-
testcase='dist.python-versions'):
31+
testcase='dist.python-versions', arches=['x86_64', 'noarch', 'src']):
3232
'''The main method to run from Taskotron'''
3333
workdir = os.path.abspath(workdir)
3434
results_path = os.path.join(artifactsdir, 'taskotron', 'results.yml')
@@ -75,10 +75,11 @@ def run(koji_build, workdir='.', artifactsdir='artifacts',
7575
srpm_packages + packages, koji_build, artifact))
7676
details.append(task_python_usage(logs, koji_build, artifact))
7777

78-
# update testcase for all subtasks (use their existing testcase as a
79-
# suffix)
8078
for detail in details:
79+
# update testcase for all subtasks (use their existing testcase as a
80+
# suffix)
8181
detail.checkname = '{}.{}'.format(testcase, detail.checkname)
82+
detail.keyvals['arch'] = arches
8283

8384
# finally, the main detail with overall results
8485
outcome = 'PASSED'
@@ -89,12 +90,14 @@ def run(koji_build, workdir='.', artifactsdir='artifacts',
8990
overall_detail = check.CheckDetail(checkname=testcase,
9091
item=koji_build,
9192
report_type=check.ReportType.KOJI_BUILD,
92-
outcome=outcome)
93+
outcome=outcome,
94+
keyvals={'arch': arches})
9395
if outcome == 'FAILED':
9496
overall_detail.artifact = artifact
9597
details.append(overall_detail)
9698

97-
summary = 'python-versions {} for {}.'.format(outcome, koji_build)
99+
summary = 'python-versions {} for {} ({}).'.format(
100+
outcome, koji_build, ', '.join(arches))
98101
log.info(summary)
99102

100103
# generate output reportable to ResultsDB
@@ -106,8 +109,10 @@ def run(koji_build, workdir='.', artifactsdir='artifacts',
106109

107110

108111
if __name__ == '__main__':
112+
arches = sys.argv[5].split(',')
109113
rc = run(koji_build=sys.argv[1],
110114
workdir=sys.argv[2],
111115
artifactsdir=sys.argv[3],
112-
testcase=sys.argv[4])
116+
testcase=sys.argv[4],
117+
arches=arches)
113118
sys.exit(rc)

tests.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,25 @@
5151
debug:
5252
var: workdir.path
5353

54-
- name: Compute architectures to download
54+
- name: Compute architectures to test
5555
set_fact:
56-
download_arches: "{{ taskotron_supported_arches | join(',') }}"
56+
test_arches: "{{ taskotron_supported_arches }} + ['noarch', 'src']"
5757

58-
- name: Print architectures to download
58+
- name: Print architectures to test
5959
debug:
60-
var: download_arches
60+
var: test_arches
6161

6262
- block:
6363
- name: Download RPMs from Koji
6464
shell: >
6565
python2 download_rpms.py {{ taskotron_item }} {{ workdir.path }}
66-
{{ download_arches }}
66+
{{ test_arches | join(',') }}
6767
&> {{ artifacts }}/test.log
6868
6969
- name: Run task
7070
shell: >
7171
python2 python_versions_check.py {{ taskotron_item }} {{ workdir.path }}
72-
{{ artifacts }} {{ testcase }}
72+
{{ artifacts }} {{ testcase }} {{ test_arches | join(',') }}
7373
&>> {{ artifacts }}/test.log
7474
always:
7575
- name: Print results location

0 commit comments

Comments
 (0)