summary refs log tree commit diff
path: root/pkgs/development/libraries/malcontent/installed-tests-path.patch
blob: 5d26c0f864f8afabb4378a726b152bb471bbc4db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff --git a/libmalcontent/tests/meson.build b/libmalcontent/tests/meson.build
index 610bc35..13e0713 100644
--- a/libmalcontent/tests/meson.build
+++ b/libmalcontent/tests/meson.build
@@ -72,9 +72,9 @@ test_programs = [
   ], deps],
 ]
 
-installed_tests_metadir = join_paths(datadir, 'installed-tests',
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
                                      'libmalcontent-' + libmalcontent_api_version)
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
                                      'libmalcontent-' + libmalcontent_api_version)
 
 foreach program: test_programs
@@ -105,4 +105,4 @@ foreach program: test_programs
     env: envs,
     args: ['--tap'],
   )
-endforeach
\ No newline at end of file
+endforeach
diff --git a/meson_options.txt b/meson_options.txt
index d516c70..583cb94 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,6 +4,12 @@ option(
   value: false,
   description: 'enable installed tests'
 )
+option(
+  'installed_test_prefix',
+  type: 'string',
+  value: '',
+  description: 'Prefix for installed tests'
+)
 option(
   'pamlibdir',
   type: 'string',
diff --git a/pam/tests/meson.build b/pam/tests/meson.build
index 0560dcb..a74dab2 100644
--- a/pam/tests/meson.build
+++ b/pam/tests/meson.build
@@ -12,9 +12,9 @@ test_programs = [
   ['pam_malcontent', [], deps],
 ]
 
-installed_tests_metadir = join_paths(datadir, 'installed-tests',
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
                                      'libmalcontent-' + libmalcontent_api_version)
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
                                      'libmalcontent-' + libmalcontent_api_version)
 
 foreach program: test_programs