forked from fedora-copr/copr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
22 lines (19 loc) · 819 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
This package contains support for running (mainly) static analysis tools such as
`rpmlint`, `fedora-review`, `covscan`, `rpmgrill`, etc.
"""
from copr_rpmbuild.automation.fedora_review import FedoraReview
from copr_rpmbuild.automation.srpm_results import SRPMResults
from copr_rpmbuild.automation.rpm_results import RPMResults
def run_automation_tools(task, resultdir, mock_config_file, log):
"""
Iterate over all supported post-build tools (e.g. `fedora-review`,
`rpmlint`, etc) and run the desired ones for a given task.
"""
tools = [FedoraReview, SRPMResults, RPMResults]
for _class in tools:
tool = _class(task, resultdir, mock_config_file, log)
if not tool.enabled:
continue
log.info("Running %s tool", tool.__class__.__name__)
tool.run()