diff --git a/SConstruct b/SConstruct index 07b791cb0..19063b865 100644 --- a/SConstruct +++ b/SConstruct @@ -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', True) + ,('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) diff --git a/src/gui/gtk-lumiera.cpp b/src/gui/gtk-lumiera.cpp index 341587d81..66698150c 100644 --- a/src/gui/gtk-lumiera.cpp +++ b/src/gui/gtk-lumiera.cpp @@ -27,7 +27,6 @@ NOBUG_CPP_DEFINE_FLAG(gui); using namespace Gtk; using namespace Glib; -using namespace sigc; using namespace gui; GtkLumiera the_application; diff --git a/src/tool/try.cpp b/src/tool/try.cpp index 90bdfadf8..cd654bf73 100644 --- a/src/tool/try.cpp +++ b/src/tool/try.cpp @@ -5,9 +5,6 @@ // 8/07 - how to control NOBUG?? // execute with NOBUG_LOG='ttt:TRACE' bin/try -// 1/08 - working out a static initialisation problem for Visitor (Tag creation) -// 1/08 - check 64bit longs -// 4/08 - comparison operators on shared_ptr #include @@ -22,7 +19,8 @@ using std::cout; -int main (int argc, char* argv[]) +int +main (int argc, char* argv[]) { NOBUG_INIT; diff --git a/tests/SConscript b/tests/SConscript index d47b9d943..cd4fd2ae3 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -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']) diff --git a/tests/test.sh b/tests/test.sh index e2d5159b7..31c92da5b 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -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