3 tests = Split('prepare.sh \
7 extra_dist = Split('fastcgi-10.conf \
9 fastcgi-responder.conf \
15 var-include-sub.conf \
40 fcgi_auth = env.Program("fcgi-auth", "fcgi-auth.c", LIBS=[env['LIBFCGI'], env['APPEND_LIBS']])
41 fcgi_responder = env.Program("fcgi-responder", "fcgi-responder.c", LIBS=[env['LIBFCGI'], env['APPEND_LIBS']])
43 def CopyTestBinary(env, binary):
44 return env.Command(target = env['ENV']['top_builddir'] + '/tests/' + binary, source = binary, action = Copy("$TARGET", "$SOURCE"))
46 def BuildTestEnv(env, build_type):
48 dependencies = [build_type]
49 if build_type == 'dynamic':
51 dependencies += ['modules']
54 testenv['ENV']['srcdir']='tests'
55 testenv['ENV']['top_builddir']='sconsbuild/' + builddir
56 prepare = testenv.AlwaysBuild(testenv.Command(build_type + '/prepare', 'prepare.sh', 'tests/prepare.sh'))
57 runtests = testenv.AlwaysBuild(testenv.Command(build_type + '/run-tests', 'run-tests.pl', 'tests/run-tests.pl'))
58 cleanup = testenv.AlwaysBuild(testenv.Command(build_type + '/cleanup', 'cleanup.sh', 'tests/cleanup.sh'))
59 testenv.Depends(runtests, prepare)
60 testenv.Depends(cleanup, runtests)
61 SideEffect('dummy-file-prevent-running-tests-in-parallel', runtests)
63 testenv.Depends(runtests, dependencies)
66 fcgis = [CopyTestBinary(testenv, 'fcgi-auth'), CopyTestBinary(testenv, 'fcgi-responder')]
67 testenv.Depends(runtests, fcgis)
69 return [prepare, runtests, cleanup]
71 check_dynamic = env.Alias('check_dynamic', BuildTestEnv(env, 'dynamic'))
72 env.Depends(check_dynamic, 'modules')
73 check_static = env.Alias('check_static', BuildTestEnv(env, 'static'))
74 check_fullstatic = env.Alias('check_fullstatic', BuildTestEnv(env, 'fullstatic'))
78 if env['build_dynamic']:
79 checks += check_dynamic
81 if env['build_static']:
82 checks += check_static
84 if env['build_fullstatic']:
85 checks += check_fullstatic
87 env.Alias('check', checks)