summaryrefslogtreecommitdiff
path: root/tests/meson.build
blob: b1a38399c118a13be8673a5901ed5e5c5ff3a4d1 (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
compiler = meson.get_compiler('c')
socket_libs = []
if target_machine.system() == 'windows'
	socket_libs = [ compiler.find_library('ws2_32') ]
endif
if target_machine.system() == 'sunos'
	socket_libs = [ compiler.find_library('socket')
	              , compiler.find_library('nsl')
	              ]
elif target_machine.system() == 'haiku'
	socket_libs = [ compiler.find_library('network') ]
endif

executable('fcgi-responder',
	sources: 'fcgi-responder.c',
	dependencies: [ common_flags, socket_libs ]
)

executable('scgi-responder',
	sources: 'scgi-responder.c',
	dependencies: [ common_flags, socket_libs ]
)

env = environment()
env.set('srcdir', meson.current_source_dir())
env.set('top_builddir', meson.build_root())

tests = [
	'request.t',
	'core-condition.t',
	'mod-fastcgi.t',
	'mod-scgi.t',
]

# just hope it will run the tests in the given order
test('prepare', find_program('./prepare.sh'), env: env, is_parallel: false)
foreach t: tests
	test(t, find_program('./' + t), env: env, is_parallel: false)
endforeach
test('cleanup', find_program('./cleanup.sh'), env: env, is_parallel: false)