about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch b/nixpkgs/pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch
new file mode 100644
index 000000000000..63059f3ac73c
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch
@@ -0,0 +1,37 @@
+diff --git a/meson_options.txt b/meson_options.txt
+index 7e89619..76497db 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,4 @@
++option('installed_test_prefix', type: 'string', description: 'Prefix for installed tests')
+ option('systemdsystemunitdir',
+        description: 'systemd unit directory',
+        type: 'string',
+diff --git a/tests/meson.build b/tests/meson.build
+index b306a7f..7670e1b 100644
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -2,8 +2,8 @@ envs = environment()
+ envs.set ('top_builddir', meson.build_root())
+ envs.set ('top_srcdir', meson.source_root())
+ 
+-installed_test_bindir = libexecdir / 'installed-tests' / meson.project_name()
+-installed_test_datadir = datadir / 'installed-tests' / meson.project_name()
++installed_test_bindir = get_option('installed_test_prefix') / 'libexec' / 'installed-tests' / meson.project_name()
++installed_test_datadir = get_option('installed_test_prefix') / 'share' / 'installed-tests' / meson.project_name()
+ 
+ python3 = find_program('python3')
+ unittest_inspector = find_program('unittest_inspector.py')
+diff --git a/tests/integration-test.py b/tests/integration-test.py
+index 22dc42c..0f92b76 100755
+--- a/tests/integration-test.py
++++ b/tests/integration-test.py
+@@ -67,7 +67,7 @@ class Tests(dbusmock.DBusTestCase):
+             print('Testing binaries from JHBuild (%s)' % cls.daemon_path)
+         else:
+             cls.daemon_path = None
+-            with open('/usr/lib/systemd/system/power-profiles-daemon.service') as f:
++            with open('/run/current-system/sw/lib/systemd/system/power-profiles-daemon.service') as f:
+                 for line in f:
+                     if line.startswith('ExecStart='):
+                         cls.daemon_path = line.split('=', 1)[1].strip()