diff options
author | Andrea Bolognani <abologna@redhat.com> | 2022-05-30 12:02:04 +0200 |
---|---|---|
committer | Andrea Bolognani <abologna@redhat.com> | 2022-05-30 12:02:17 +0200 |
commit | 101f8c258fb65489bae0676e5603f7ac55d0e0b6 (patch) | |
tree | 2541e05815a828659cdc5f797d69d6a3ce9adbec | |
parent | f2a3ed2152eedbd6913da02e05c0d54d0bd0db7e (diff) | |
download | libvirt-ci-101f8c258fb65489bae0676e5603f7ac55d0e0b6.zip libvirt-ci-101f8c258fb65489bae0676e5603f7ac55d0e0b6.tar.gz libvirt-ci-101f8c258fb65489bae0676e5603f7ac55d0e0b6.tar.bz2 |
lcitool: Don't unconditionally reference sanity-checks.yml
If none of the sanity checks are enabled, then the file would
end up having zero length so lcitool doesn't create it. That
means we also have to avoid referencing it elsewhere.
Resolves: https://gitlab.com/libvirt/libvirt-ci/-/issues/14
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
-rw-r--r-- | guests/lcitool/lcitool/manifest.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/guests/lcitool/lcitool/manifest.py b/guests/lcitool/lcitool/manifest.py index a5cd5dc..62c7991 100644 --- a/guests/lcitool/lcitool/manifest.py +++ b/guests/lcitool/lcitool/manifest.py @@ -304,9 +304,10 @@ class Manifest: if jobinfo["clang-format"]: testcontent.append(gitlab.clang_format_job()) - path = Path(gitlabdir, "sanity-checks.yml") - self._replace_file(testcontent, path, dryrun) - includes.append(path) + if len(testcontent) > 0: + path = Path(gitlabdir, "sanity-checks.yml") + self._replace_file(testcontent, path, dryrun) + includes.append(path) if gitlabinfo["containers"]: path = Path(gitlabdir, "containers.yml") |