SCons: options for controling testsuite execution
This commit is contained in:
parent
6e12b74d9e
commit
850f49904e
3 changed files with 15 additions and 4 deletions
|
|
@ -102,7 +102,7 @@ def appendVal(env,var,targetVar,val=None):
|
|||
def handleNoBugSwitches(env):
|
||||
""" set the build level for NoBug.
|
||||
Release builds imply no DEBUG
|
||||
wheras ALPHA and BETA require DEBUG
|
||||
whereas ALPHA and BETA require DEBUG
|
||||
"""
|
||||
level = env['BUILDLEVEL']
|
||||
if level in ['ALPHA', 'BETA']:
|
||||
|
|
@ -128,6 +128,8 @@ def defineCmdlineOptions():
|
|||
allowed_values=('ALPHA', 'BETA', 'RELEASE'))
|
||||
,BoolOption('DEBUG', 'Build with debugging information and no optimizations', False)
|
||||
,BoolOption('OPTIMIZE', 'Build with strong optimization (-O3)', False)
|
||||
,BoolOption('VALGRIND', 'Run Testsuite under valgrind control', False)
|
||||
,('TESTSUITES', 'Run only Testsuites matching the given pattern', '')
|
||||
# ,BoolOption('OPENGL', 'Include support for OpenGL preview rendering', False)
|
||||
# ,EnumOption('DIST_TARGET', 'Build target architecture', 'auto',
|
||||
# allowed_values=('auto', 'i386', 'i686', 'x86_64' ), ignorecase=2)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
## SConscript - SCons buildscript for the Testsuite (called by SConstruct)
|
||||
##
|
||||
|
||||
import os
|
||||
from os import path
|
||||
from Buildhelper import srcSubtree
|
||||
from Buildhelper import scanSubtree
|
||||
|
|
@ -92,9 +93,16 @@ artifacts['testsuite'] = ts = ( [ testExecutable(env, dir) for dir in moduledirs
|
|||
#
|
||||
# - the product of running the Testsuite is the ",testlog"
|
||||
# - it depends on all artifacts defined as "ts" above
|
||||
# - if not set via options switch, the environment variable TESTSUITES
|
||||
# is explicitly propagated to test.sh
|
||||
#
|
||||
testEnv = env.Clone()
|
||||
testEnv.Append(ENV = {'VALGRINDFLAGS' : 'DISABLE'})
|
||||
if not env['VALGRIND']:
|
||||
testEnv.Append(ENV = {'VALGRINDFLAGS' : 'DISABLE'})
|
||||
testsuites = env['TESTSUITES'] or os.environ.get('TESTSUITES')
|
||||
if testsuites:
|
||||
testEnv['ENV']['TESTSUITES'] = testsuites
|
||||
|
||||
testDir = env.Dir('#$BINDIR')
|
||||
runTest = env.File("test.sh").abspath
|
||||
|
||||
|
|
@ -110,5 +118,5 @@ runTs = testEnv.Command(',testlog', ts, runTest, chdir=testDir)
|
|||
env.Alias('testcode', ts )
|
||||
env.Alias('check', runTs )
|
||||
|
||||
# declare tempfiles of test.sh as cleanable
|
||||
# allow tempfiles of test.sh to be cleaned
|
||||
env.Clean ('check', [',testlog.pre',',expect_stdout',',stdout',',stderr',',testtmp','.libs'])
|
||||
|
|
|
|||
|
|
@ -200,7 +200,8 @@ function RUNTESTS()
|
|||
echo "$t"
|
||||
done | sort | uniq | {
|
||||
while read i; do
|
||||
echo $i >&2
|
||||
echo
|
||||
echo "### $i" >&2
|
||||
if test -f $i; then
|
||||
source $i
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue