summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-09-05 23:14:10 +0100
committerSimon McVittie <smcv@collabora.com>2022-09-05 23:14:10 +0100
commit2bc8a75c3e0c76647c49b97f7d2df5a106bf9750 (patch)
treeae39882df595227e701385d5ef0d99bcff0536c2
parenta6c7b4e9af5b7ef8df46d8d897f2600b4b0c0bca (diff)
downloaddbus-python-2bc8a75c3e0c76647c49b97f7d2df5a106bf9750.tar.gz
meson: Make installed-tests from multiple builds co-installable
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r--meson_options.txt7
-rw-r--r--test/meson.build4
2 files changed, 9 insertions, 2 deletions
diff --git a/meson_options.txt b/meson_options.txt
index 7dc5218..b45debb 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,6 +16,13 @@ option(
)
option(
+ 'installed_tests_subdir',
+ type: 'string',
+ value: '',
+ description: 'Suffix to make installed-tests from multiple builds co-installable',
+)
+
+option(
'python',
type: 'string',
value: '',
diff --git a/test/meson.build b/test/meson.build
index 3539f8d..7c2db7b 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -1,9 +1,9 @@
# Copyright 2022 Collabora Ltd.
# SPDX-License-Identifier: MIT
-installed_testdir = get_option('libexecdir') / 'installed-tests' / meson.project_name()
+installed_testdir = get_option('libexecdir') / 'installed-tests' / meson.project_name() / get_option('installed_tests_subdir')
installed_test_testdir = installed_testdir / 'test'
-installed_test_metadir = get_option('datadir') / 'installed-tests' / meson.project_name()
+installed_test_metadir = get_option('datadir') / 'installed-tests' / meson.project_name() / get_option('installed_tests_subdir')
test_env = environment()
test_env.set('DBUS_TOP_SRCDIR', meson.project_source_root())
test_env.set('DBUS_TOP_BUILDDIR', meson.project_build_root())