aboutsummaryrefslogtreecommitdiff
path: root/meson.build
blob: e97a71acc6a04b79b0225e4647bb85c2cf2c8bb8 (plain)
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
project('lfrtm', 'c', default_options : [
	'buildtype=release',
	'warning_level=3',
	'werror=true',
	'b_lto=true',
	'c_std=c11'])

version = run_command('cat', 'VERSION').stdout().strip()

add_project_arguments('-D_GNU_SOURCE', language : 'c')

conf_data = configuration_data()
cc = meson.get_compiler('c')

thread_dep = dependency('threads')
deps = [thread_dep]

c_args = []

dummy_calloc = shared_library('dummy_calloc',
	join_paths('test', 'dummy_calloc.c'),
	c_args : c_args,
	dependencies : deps,
	install : false)

lfrtm_test = executable('lfrtm_test',
	join_paths('test', 'lfrtm_test.c'),
	c_args : c_args,
	dependencies : deps,
	install : false)

test(' 1 threads', lfrtm_test,
	args : ['1'],
	timeout : 240)
test(' 2 threads', lfrtm_test,
	args : ['1'],
	timeout : 240)
test(' 4 threads', lfrtm_test,
	args : ['1'],
	timeout : 240)
test(' 8 threads', lfrtm_test,
	args : ['1'],
	timeout : 240)
test('16 threads', lfrtm_test,
	args : ['1'],
	timeout : 240)
test('32 threads', lfrtm_test,
	args : ['1'],
	timeout : 240)
#test('dummy alloc', lfrtm_test,
#	args : ['2', '1'],
#	timeout : 240,
#	env : ['LD_PRELOAD='+dummy_calloc.full_path()])