Switch from TAP results to YAML results (WIP)
Details
Details
Diff Detail
Diff Detail
- Repository
- rRPMLINT task-rpmlint
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Switch from TAP results to YAML results (WIP)
None
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | readme.rst (2 lines) | |||
M | run_rpmlint.py (8 lines) |
Commit | Tree | Parents | Author | Summary | Date |
---|---|---|---|---|---|
191c6dd824fd | 65ff395996c9 | ece41994dec3 | Josef Skladanka | Switch from tap to yaml (Show More…) | Sep 9 2015, 1:26 PM |
1 | Taskotron Task: rpmlint | 1 | Taskotron Task: rpmlint | ||
---|---|---|---|---|---|
2 | ======================= | 2 | ======================= | ||
3 | 3 | | |||
4 | This is an example task for taskotron. It runs rpmlint on some downloaded packages | 4 | This is an example task for taskotron. It runs rpmlint on some downloaded packages | ||
5 | and formats the results in TAP messages. | 5 | and formats the results in YAML messages. | ||
6 | 6 | | |||
7 | While it can be run standalone, it is designed to be executed by the | 7 | While it can be run standalone, it is designed to be executed by the | ||
8 | `libtaskotron proof-of-concept <https://bitbucket.org/fedoraqa/libtaskotron-demo>`_. | 8 | `libtaskotron proof-of-concept <https://bitbucket.org/fedoraqa/libtaskotron-demo>`_. | ||
9 | Please see the libtaskotron docs for details on execution. | 9 | Please see the libtaskotron docs for details on execution. |
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 19 | def run(koji_build, workdir='.', artifactsdir='artifacts'): | |||
---|---|---|---|---|---|
60 | 60 | | |||
61 | # store logs | 61 | # store logs | ||
62 | log_path = os.path.join(artifactsdir, '%s.log' % koji_build) | 62 | log_path = os.path.join(artifactsdir, '%s.log' % koji_build) | ||
63 | log.debug('Saving log to: %s', log_path) | 63 | log.debug('Saving log to: %s', log_path) | ||
64 | with open(log_path, 'w') as log_file: | 64 | with open(log_path, 'w') as log_file: | ||
65 | log_file.writelines(output) | 65 | log_file.writelines(output) | ||
66 | detail.artifact = log_path | 66 | detail.artifact = log_path | ||
67 | 67 | | |||
68 | tap = check.export_TAP(detail, checkname='rpmlint') | 68 | output = check.export_YAML(detail) | ||
69 | return tap | 69 | return output | ||
70 | 70 | | |||
71 | 71 | | |||
72 | if __name__ == '__main__': | 72 | if __name__ == '__main__': | ||
73 | tap = run('local-run') | 73 | output = run('local-run') | ||
74 | print tap | 74 | print output |