File: run-tests-independently.patch

package info (click to toggle)
wtmpdb 0.75.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 692 kB
  • sloc: ansic: 4,222; xml: 715; sh: 81; makefile: 16
file content (49 lines) | stat: -rw-r--r-- 1,726 bytes parent folder | download | duplicates (2)
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
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,7 +1,19 @@
 # This file builds and runs the unit tests
+project(
+  'wtmpdb_tests',
+  'c',
+  meson_version : '>= 0.61.0',
+)
+add_project_arguments(['-D_GNU_SOURCE=1',
+		       '-DXTSTRINGDEFINES',
+		       '-D_FORTIFY_SOURCE=2',
+                       '-D_FILE_OFFSET_BITS=64',
+                       '-D_TIME_BITS=64'], language : 'c')
 
+cc = meson.get_compiler('c')
 libdl = cc.find_library('dl')
-
+libwtmpdb = dependency('libwtmpdb')
+inc = include_directories(['lib'])
 
 tst_dlopen_exe = executable('tst-dlopen', 'tst-dlopen.c', dependencies : libdl)
 test('tst-dlopen', tst_dlopen_exe, args : ['pam_wtmpdb.so'])
@@ -11,21 +18,21 @@
 
 tst_logwtmpdb = executable ('tst-logwtmpdb', 'tst-logwtmpdb.c',
                         include_directories : inc,
-                        link_with : libwtmpdb)
+                        dependencies : [libwtmpdb])
 test('tst-logwtmpdb', tst_logwtmpdb)
 
 tst_login_logout = executable ('tst-login-logout', 'tst-login-logout.c', 
                         include_directories : inc,
-                        link_with : libwtmpdb)
+                        dependencies : [libwtmpdb])
 test('tst-login-logout', tst_login_logout)
 
 tst_get_id = executable ('tst-get_id', 'tst-get_id.c',
                         include_directories : inc,
-                        link_with : libwtmpdb)
+                        dependencies : [libwtmpdb])
 test('tst-get_id', tst_get_id)
 
 tst_varlink = executable ('tst-varlink', 'tst-varlink.c',
                         include_directories : inc,
-                        link_with : libwtmpdb)
+                        dependencies : [libwtmpdb])
 test('tst-varlink', tst_varlink)