From a010274d4b92b45a25bad8961bfa2dd33e778cbc Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 19 Sep 2022 13:39:55 -0400 Subject: Automaticall tag installed tests It is common, at least in GNOME projects, to install tests. Files goes into various locations, including: - /usr/lib/x86_64-linux-gnu/installed-tests - /usr/share/installed-tests - /usr/libexec/installed-tests It is safe to assume that everything that goes into a "installed-tests" subdir should be tagged as "tests" by default. --- docs/markdown/Installing.md | 2 ++ mesonbuild/backend/backends.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/markdown/Installing.md b/docs/markdown/Installing.md index 59cd813..26340bc 100644 --- a/docs/markdown/Installing.md +++ b/docs/markdown/Installing.md @@ -182,6 +182,8 @@ time, please help extending the list of well known categories. - `bin-devel`: * Scripts and executables bundled with a library meant to be used by developers (i.e. build tools). +- `tests`: + * Files installed into `installed-tests` subdir (*Since 0.64.0*). Custom installation tag can be set using the `install_tag` keyword argument on various functions such as [[custom_target]], [[configure_file]], diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 28cd73e..ba342a1 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -1540,6 +1540,8 @@ class Backend: return 'devel' elif localedir in dest_path.parents: return 'i18n' + elif 'installed-tests' in dest_path.parts: + return 'tests' mlog.debug('Failed to guess install tag for', dest_path) return None -- cgit v1.1