xref: /lighttpd1.4/tests/meson.build (revision c0f040ea)
1compiler = meson.get_compiler('c')
2socket_libs = []
3if target_machine.system() == 'windows'
4	socket_libs = [ compiler.find_library('ws2_32') ]
5endif
6if target_machine.system() == 'sunos'
7	socket_libs = [ compiler.find_library('socket')
8	              , compiler.find_library('nsl')
9	              ]
10elif target_machine.system() == 'haiku'
11	socket_libs = [ compiler.find_library('network') ]
12endif
13
14executable('fcgi-responder',
15	sources: 'fcgi-responder.c',
16	dependencies: [ common_flags, socket_libs ]
17)
18
19executable('scgi-responder',
20	sources: 'scgi-responder.c',
21	dependencies: [ common_flags, socket_libs ]
22)
23
24env = environment()
25env.set('srcdir', meson.current_source_dir())
26env.set('top_builddir', meson.build_root())
27
28tests = [
29	'request.t',
30	'core-condition.t',
31	'mod-fastcgi.t',
32	'mod-scgi.t',
33]
34
35# just hope it will run the tests in the given order
36test('prepare', find_program('./prepare.sh'), env: env, is_parallel: false)
37foreach t: tests
38	test(t, find_program('./' + t), env: env, is_parallel: false)
39endforeach
40test('cleanup', find_program('./cleanup.sh'), env: env, is_parallel: false)
41