allow skipping tests with SKIPTESTS

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5126 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-04-26 20:04:43 +00:00
parent d43219aa96
commit cdf33703be

View file

@ -123,6 +123,7 @@ opts.Add(ListOption('SKIPPLUGINS', 'A list of plug-ins that will not be built',
opts.Add(ListOption('SKIPUTILS', 'A list of utilities that will not be built', 'none', utils))
opts.Add(ListOption('SKIPMISC', 'A list of plug-ins that will not be built', 'none', misc))
opts.Add(ListOption('SKIPDOC', 'A list of doc files that will not be built/installed', 'none', doc))
opts.Add(('SKIPTESTS', 'A comma-separated list of test files that will not be ran', 'none'))
# build tools
opts.Add(BoolOption('MSTOOLKIT', 'Use Microsoft Visual C++ Toolkit', 'no'))
opts.Add(BoolOption('CHMDOCS', 'Build CHM documentation, requires hhc.exe', hhc))
@ -656,10 +657,17 @@ def test_scripts(target, source, env):
makensis = instdir + sep + 'makensis'
tdlen = len(env.subst('$TESTDISTDIR'))
skipped_tests = env['SKIPTESTS'].split(',')
for root, dirs, files in walk(instdir):
for file in files:
if file[-4:] == '.nsi':
nsi = root + sep + file
if nsi[tdlen + 1:] in skipped_tests:
continue
cmd = env.Command(None, nsi, '%s $SOURCE' % makensis)
AlwaysBuild(cmd)
env.Alias('test-scripts', cmd)