[glib: 4/5] ci: Check that all installed files have a tag
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/5] ci: Check that all installed files have a tag
- Date: Wed, 21 Sep 2022 10:05:22 +0000 (UTC)
commit 497f15181087ff00f94edae7bc372386529ca0e0
Author: Xavier Claessens <xavier claessens collabora com>
Date: Mon Sep 19 10:29:40 2022 -0400
ci: Check that all installed files have a tag
.gitlab-ci/check-missing-install-tag.py | 25 +++++++++++++++++++++++++
.gitlab-ci/run-tests.sh | 2 ++
.gitlab-ci/test-msvc.bat | 1 +
3 files changed, 28 insertions(+)
---
diff --git a/.gitlab-ci/check-missing-install-tag.py b/.gitlab-ci/check-missing-install-tag.py
new file mode 100755
index 0000000000..7081bc7465
--- /dev/null
+++ b/.gitlab-ci/check-missing-install-tag.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+
+"""
+This script checks Meson configuration logs to verify no installed file is
+missing installation tag.
+"""
+
+import argparse
+from pathlib import Path
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('builddir', type=Path)
+ args = parser.parse_args()
+
+ logfile = args.builddir / 'meson-logs' / 'meson-log.txt'
+ with logfile.open(encoding='utf-8') as f:
+ if 'Failed to guess install tag' in f.read():
+ print(f'Some files are missing install_tag, see {logfile} for details.')
+ return 1
+ return 0
+
+
+if __name__ == "__main__":
+ exit(main())
diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh
index 86402dcaf4..634f861eb8 100755
--- a/.gitlab-ci/run-tests.sh
+++ b/.gitlab-ci/run-tests.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+./.gitlab-ci/check-missing-install-tag.py _build
+
meson test \
-C _build \
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat
index 37976d4d00..82e445e00a 100644
--- a/.gitlab-ci/test-msvc.bat
+++ b/.gitlab-ci/test-msvc.bat
@@ -14,6 +14,7 @@ set args=%args:~1%
:: FIXME: make warnings fatal
pip3 install --upgrade --user meson==0.60.3 || goto :error
meson %args% _build || goto :error
+python .gitlab-ci/check-missing-install-tag.py _build || goto :error
ninja -C _build || goto :error
:: FIXME: dont ignore test errors
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]