Annotation of embedaddon/lighttpd/tests/SConscript, revision 1.1.1.2
1.1 misho 1: Import('env')
2:
3: tests = Split('prepare.sh \
1.1.1.2 ! misho 4: run-tests.pl \
! 5: cleanup.sh')
1.1 misho 6:
7: extra_dist = Split('fastcgi-10.conf \
1.1.1.2 ! misho 8: fastcgi-auth.conf \
! 9: fastcgi-responder.conf \
! 10: fastcgi-13.conf \
! 11: bug-06.conf \
! 12: bug-12.conf \
! 13: core-var-include.t \
! 14: var-include.conf \
! 15: var-include-sub.conf \
! 16: condition.conf \
! 17: core-condition.t \
! 18: core-request.t \
! 19: core-response.t \
! 20: core-keepalive.t \
! 21: core.t \
! 22: mod-access.t \
! 23: mod-auth.t \
! 24: mod-cgi.t \
! 25: mod-compress.t \
! 26: mod-compress.conf \
! 27: mod-fastcgi.t \
! 28: mod-redirect.t \
! 29: mod-userdir.t \
! 30: mod-rewrite.t \
! 31: request.t \
! 32: mod-ssi.t \
! 33: LightyTest.pm \
! 34: mod-setenv.t')
! 35:
! 36: fcgi_auth = None
! 37: fcgi_responder = None
1.1 misho 38:
39: if env['LIBFCGI']:
1.1.1.2 ! misho 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']])
! 42:
! 43: def CopyTestBinary(env, binary):
! 44: return env.Command(target = env['ENV']['top_builddir'] + '/tests/' + binary, source = binary, action = Copy("$TARGET", "$SOURCE"))
! 45:
! 46: def BuildTestEnv(env, build_type):
! 47: builddir = build_type
! 48: dependencies = [build_type]
! 49: if build_type == 'dynamic':
! 50: builddir = '.'
! 51: dependencies += ['modules']
! 52:
! 53: testenv = env.Clone()
! 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)
! 62:
! 63: testenv.Depends(runtests, dependencies)
! 64:
! 65: if env['LIBFCGI']:
! 66: fcgis = [CopyTestBinary(testenv, 'fcgi-auth'), CopyTestBinary(testenv, 'fcgi-responder')]
! 67: testenv.Depends(runtests, fcgis)
! 68:
! 69: return [prepare, runtests, cleanup]
! 70:
! 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'))
! 75:
! 76: checks = []
! 77:
! 78: if env['build_dynamic']:
! 79: checks += check_dynamic
! 80:
! 81: if env['build_static']:
! 82: checks += check_static
! 83:
! 84: if env['build_fullstatic']:
! 85: checks += check_fullstatic
1.1 misho 86:
1.1.1.2 ! misho 87: env.Alias('check', checks)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>