diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2021-10-29 09:14:33 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2021-10-30 14:45:37 +0200 |
commit | bb9ea6763d1e4ef7f94a91cf056bc245ac39ce4b (patch) | |
tree | 06a49f7478a38700bdaa2886b5ed9395f571e126 /pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch | |
parent | 6e64f03c12ef2636d86bde242cacc3b9d2ba9b8e (diff) | |
download | nixpkgs-bb9ea6763d1e4ef7f94a91cf056bc245ac39ce4b.tar nixpkgs-bb9ea6763d1e4ef7f94a91cf056bc245ac39ce4b.tar.gz nixpkgs-bb9ea6763d1e4ef7f94a91cf056bc245ac39ce4b.tar.bz2 nixpkgs-bb9ea6763d1e4ef7f94a91cf056bc245ac39ce4b.tar.lz nixpkgs-bb9ea6763d1e4ef7f94a91cf056bc245ac39ce4b.tar.xz nixpkgs-bb9ea6763d1e4ef7f94a91cf056bc245ac39ce4b.tar.zst nixpkgs-bb9ea6763d1e4ef7f94a91cf056bc245ac39ce4b.zip |
nixosTests.installed-tests.power-profiles-daemon: init
Diffstat (limited to 'pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch')
-rw-r--r-- | pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch b/pkgs/os-specific/linux/power-profiles-daemon/installed-tests-path.patch new file mode 100644 index 00000000000..63059f3ac73 --- /dev/null +++ b/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() |