1commit 2fa1d39bb54d448ffe59bf6a8358c01f786a1cce
2Author: r-vdp <ramses@well-founded.dev>
3Date: Tue Oct 15 14:49:53 2024 +0200
4
5 Add output for installed tests
6
7diff --git a/data/tests/meson.build b/data/tests/meson.build
8index a22a989f3..cbd135cfa 100644
9--- a/data/tests/meson.build
10+++ b/data/tests/meson.build
11@@ -105,7 +105,7 @@ configure_file(
12 output: 'fwupd-tests.conf',
13 configuration: con2,
14 install: true,
15- install_dir: join_paths(datadir, 'fwupd', 'remotes.d'),
16+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'),
17 )
18
19 if umockdev_integration_tests.allowed()
20diff --git a/meson.build b/meson.build
21index 5a35cfda1..40ef142f0 100644
22--- a/meson.build
23+++ b/meson.build
24@@ -194,8 +194,8 @@ else
25 datadir = join_paths(prefix, get_option('datadir'))
26 sysconfdir = join_paths(prefix, get_option('sysconfdir'))
27 localstatedir = join_paths(prefix, get_option('localstatedir'))
28- installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
29- installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
30+ installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
31+ installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
32 daemon_dir = join_paths(libexecdir, 'fwupd')
33 endif
34 mandir = join_paths(prefix, get_option('mandir'))
35@@ -545,6 +545,7 @@ gnome = import('gnome')
36 i18n = import('i18n')
37
38 conf.set_quoted('FWUPD_PREFIX', prefix)
39+conf.set_quoted('FWUPD_INSTALLED_TEST_PREFIX', get_option('installed_test_prefix'))
40 conf.set_quoted('FWUPD_BINDIR', bindir)
41 conf.set_quoted('FWUPD_LIBDIR', libdir)
42 conf.set_quoted('FWUPD_LIBEXECDIR', libexecdir)
43diff --git a/meson_options.txt b/meson_options.txt
44index e04bb37c9..b1060ddb8 100644
45--- a/meson_options.txt
46+++ b/meson_options.txt
47@@ -333,6 +333,10 @@ option('systemd_syscall_filter',
48 value: 'true',
49 description: 'Enable systemd syscall filter',
50 )
51+option('installed_test_prefix',
52+ type: 'string',
53+ description: 'Prefix for installed tests'
54+)
55 option('tests',
56 type: 'boolean',
57 value: true,
58diff --git a/src/tests/host-emulate/meson.build b/src/tests/host-emulate/meson.build
59index 4bc02e46e..17bc2270d 100644
60--- a/src/tests/host-emulate/meson.build
61+++ b/src/tests/host-emulate/meson.build
62@@ -9,7 +9,7 @@ if build_standalone
63 capture: true,
64 command: [gzip, '-k', '--stdout', '@INPUT@'],
65 install: true,
66- install_dir: join_paths(datadir, 'fwupd', 'host-emulate.d'),
67+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'host-emulate.d'),
68 )
69 endforeach
70 endif