aboutsummaryrefslogtreecommitdiff
path: root/src/service/datastore/meson.build
blob: 802ebb0a0c8b57603c05382b57eeb93eafe1e007 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
libgnunetdatastore_src = ['datastore_api.c']

gnunetservicedatastore_src = ['gnunet-service-datastore.c']

configure_file(input : 'datastore.conf.in',
  output : 'datastore.conf',
  configuration : cdata,
  install: true,
  install_dir: pkgcfgdir)

if get_option('monolith')
  foreach p : libgnunetdatastore_src + gnunetservicedatastore_src
    gnunet_src += 'datastore/' + p
  endforeach
endif

libgnunetdatastore = library('gnunetdatastore',
  libgnunetdatastore_src,
  soversion: '1',
  version: '1.0.0',
  dependencies: [libgnunetutil_dep,
    libgnunetstatistics_dep,
    libgnunetdatacache_dep],
  include_directories: [incdir, configuration_inc],
  install: true,
  install_dir: get_option('libdir'))
libgnunetdatastore_dep = declare_dependency(link_with : libgnunetdatastore)
pkg.generate(libgnunetdatastore, url: 'https://www.gnunet.org',
  description : 'Management API for the datastore for persistent storage to disk')

executable ('gnunet-service-datastore',
  gnunetservicedatastore_src,
  dependencies: [libgnunetdatastore_dep,
    libgnunetutil_dep,
    libgnunetstatistics_dep,
    libgnunetdatacache_dep],
  include_directories: [incdir, configuration_inc],
  install: true,
  install_dir: get_option('libdir')/'gnunet'/'libexec')

testds_sqlite = executable ('test_store_api_sqlite',
  ['test_datastore_api.c'],
  dependencies: [
    libgnunetdatastore_dep,
    libgnunetutil_dep,
    libgnunettesting_dep
    ],
  include_directories: [incdir, configuration_inc],
  install: false)

testds_mgmt_sqlite = executable ('test_datastore_api_management_sqlite',
  ['test_datastore_api_management.c'],
  dependencies: [
    libgnunetdatastore_dep,
    libgnunetutil_dep,
    libgnunettesting_dep
    ],
  include_directories: [incdir, configuration_inc],
  install: false)

testds_heap = executable ('test_datastore_api_heap',
  ['test_datastore_api.c'],
  dependencies: [
    libgnunetdatastore_dep,
    libgnunetutil_dep,
    libgnunettesting_dep
    ],
  include_directories: [incdir, configuration_inc],
  install: false)

testds_mgmt_heap = executable ('test_datastore_api_management_heap',
  ['test_datastore_api_management.c'],
  dependencies: [
    libgnunetdatastore_dep,
    libgnunetutil_dep,
    libgnunettesting_dep
    ],
  include_directories: [incdir, configuration_inc],
  install: false)

testds_pq = executable ('test_datastore_api_postgres',
  ['test_datastore_api.c'],
  dependencies: [
    libgnunetdatastore_dep,
    libgnunetutil_dep,
    libgnunettesting_dep
    ],
  include_directories: [incdir, configuration_inc],
  install: false)

testds_mgmt_pq = executable ('test_datastore_api_management_postgres',
  ['test_datastore_api_management.c'],
  dependencies: [
    libgnunetdatastore_dep,
    libgnunetutil_dep,
    libgnunettesting_dep
    ],
  include_directories: [incdir, configuration_inc],
  install: false)

configure_file(input : 'test_defaults.conf',
  output : 'test_defaults.conf',
  copy: true)
configure_file(input : 'test_datastore_api_data_sqlite.conf',
  output : 'test_datastore_api_data_sqlite.conf',
  copy: true)
configure_file(input : 'test_datastore_api_data_heap.conf',
  output : 'test_datastore_api_data_heap.conf',
  copy: true)
configure_file(input : 'test_datastore_api_data_postgres.conf',
  output : 'test_datastore_api_data_postgres.conf',
  copy: true)

test('test_datastore_api_sqlite', testds_sqlite,
  is_parallel: false,
  suite: 'datastore', workdir: meson.current_build_dir())
test('test_datastore_api_management_sqlite', testds_mgmt_sqlite,
  is_parallel: false,
  suite: 'datastore', workdir: meson.current_build_dir())
test('test_datastore_api_heap', testds_heap,
  is_parallel: false,
  suite: 'datastore', workdir: meson.current_build_dir())
test('test_datastore_api_management_heap', testds_mgmt_heap,
  is_parallel: false,
  suite: 'datastore', workdir: meson.current_build_dir())
test('test_datastore_api_postgres', testds_pq,
  is_parallel: false,
  suite: 'datastore', workdir: meson.current_build_dir())
test('test_datastore_api_management_postgres', testds_mgmt_pq,
  is_parallel: false,
  suite: 'datastore', workdir: meson.current_build_dir())