SCons: allow setting VALGRINDFLAGS from the environment

This commit is contained in:
Fischlurch 2008-12-26 23:31:00 +01:00
parent cbbc298fe9
commit 0bd0cfc549

View file

@ -92,9 +92,14 @@ artifacts['testsuite'] = ts = ( [ testExecutable(env, dir) for dir in ['lib','co
# is explicitly propagated to test.sh
#
testEnv = env.Clone()
if not env['VALGRIND']:
testEnv.Append(ENV = { 'VALGRINDFLAGS' : 'DISABLE'
, 'LUMIERA_CONFIG_PATH' : './' })
valgrind = os.environ.get('VALGRINDFLAGS', '') # unset if not defined
if not valgrind and not env['VALGRIND']:
valgrind = 'DISABLE'
testEnv.Append(ENV = { 'VALGRINDFLAGS' : valgrind
, 'LUMIERA_CONFIG_PATH' : './'
})
testsuites = env['TESTSUITES'] or os.environ.get('TESTSUITES')
if testsuites: