summaryrefslogtreecommitdiff
path: root/tests/meson.build
blob: 0692f7efbcd7ae0e006583c4401da29ee905e904 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
libfcgi = compiler.find_library('fcgi', required: false)
if libfcgi.found()
	found_fcgi_header = false
	libfcgi = [ libfcgi ]

	if compiler.has_header('fcgi_stdio.h')
		found_fcgi_header = true
		libfcgi += [ declare_dependency(
			compile_args: '-DHAVE_FCGI_STDIO_H'
		) ]
	elif compiler.has_header('fastcgi/fcgi_stdio.h')
		found_fcgi_header = true
		libfcgi += [ declare_dependency(
			compile_args: '-DHAVE_FASTCGI_FCGI_STDIO_H'
		) ]
	endif

	if found_fcgi_header
		executable('fcgi-auth',
			sources: 'fcgi-auth.c',
			dependencies: common_flags + libfcgi,
		)
		executable('fcgi-responder',
			sources: 'fcgi-responder.c',
			dependencies: common_flags + libfcgi,
		)
	endif
endif

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

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

tests = [
	'cachable.t',
	'core-404-handler.t',
	'core-condition.t',
	'core-keepalive.t',
	'core-request.t',
	'core-response.t',
	'core-var-include.t',
	'core.t',
	'lowercase.t',
	'mod-access.t',
	'mod-auth.t',
	'mod-cgi.t',
	'mod-compress.t',
	'mod-extforward.t',
	'mod-fastcgi.t',
	'mod-proxy.t',
	'mod-redirect.t',
	'mod-rewrite.t',
	'mod-secdownload.t',
	'mod-setenv.t',
	'mod-simplevhost.t',
	'mod-ssi.t',
	'mod-userdir.t',
	'request.t',
	'symlink.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)