Files
nixpkgs/pkgs/by-name/fw/fwupd/installed-tests-path.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
2.7 KiB
Diff
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
commit 954e41500e1b409a24fca43ae3bdc1c6a890db48
Author: r-vdp <ramses@well-founded.dev>
Date: Tue Oct 15 14:49:53 2024 +0200
Add output for installed tests
diff --git a/data/tests/meson.build b/data/tests/meson.build
index 3eba65eea..cf3931bb7 100644
--- a/data/tests/meson.build
+++ b/data/tests/meson.build
@@ -122,7 +122,7 @@ configure_file(
configuration: con2,
install: true,
install_tag: 'tests',
- install_dir: join_paths(datadir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'),
)
if umockdev_integration_tests.allowed()
diff --git a/meson.build b/meson.build
index cb66be0cc..ca431980b 100644
--- a/meson.build
+++ b/meson.build
@@ -239,8 +239,8 @@ else
datadir = join_paths(prefix, get_option('datadir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
- installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
- installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
+ installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
+ installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
daemon_dir = join_paths(libexecdir, 'fwupd')
endif
mandir = join_paths(prefix, get_option('mandir'))
@@ -721,6 +721,7 @@ gnome = import('gnome')
i18n = import('i18n')
conf.set_quoted('FWUPD_PREFIX', prefix)
+conf.set_quoted('FWUPD_INSTALLED_TEST_PREFIX', get_option('installed_test_prefix'))
conf.set_quoted('FWUPD_BINDIR', bindir)
conf.set_quoted('FWUPD_LIBDIR', libdir)
conf.set_quoted('FWUPD_LIBEXECDIR', libexecdir)
diff --git a/meson_options.txt b/meson_options.txt
index 40103c03e..63c8d288d 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -174,6 +174,10 @@ option('systemd_unit_user',
value: 'fwupd-refresh',
description: 'User account to use for fwupd-refresh.service (empty for DynamicUser)',
)
+option('installed_test_prefix',
+ type: 'string',
+ description: 'Prefix for installed tests'
+)
option('tests',
type: 'boolean',
value: true,
diff --git a/src/tests/host-emulate/meson.build b/src/tests/host-emulate/meson.build
index c36da65cd..f0b70d4d6 100644
--- a/src/tests/host-emulate/meson.build
+++ b/src/tests/host-emulate/meson.build
@@ -9,7 +9,7 @@ if build_standalone
command: [gzip, '-k', '--stdout', '@INPUT@'],
install: true,
install_tag: 'tests',
- install_dir: join_paths(datadir, 'fwupd', 'host-emulate.d'),
+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'host-emulate.d'),
)
endforeach
endif