From 0047c5de07498b496dc82e4d80ad40d4da558338 Mon Sep 17 00:00:00 2001 From: Rob Kutschke Date: Mon, 17 Feb 2020 08:37:00 -0600 Subject: [PATCH 1/2] Add temporary hack to enable/disable running of unit tests; will be replaced with phony targets. --- SConstruct | 8 ++++++++ UnitTests/SConscript | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index c57bc7ea..20266b87 100644 --- a/SConstruct +++ b/SConstruct @@ -51,6 +51,14 @@ env = Environment( CPPPATH = [ includePath, ], BINDIR = bindir, ) +# Temporary hack to enable/disable running of tests. To run the tests: +# scons --run-tests=True +# Will be reimplemented with phony targets +AddOption('--run-tests', dest='runTests', + nargs=1,default=False, + help='--run-tests=[True,False] enables/disables running tests') +env['RUNTESTS'] = GetOption("runTests") + # Modify the environment: set compile and link flags. SetOption('warn', 'no-fortran-cxx-mix') env.MergeFlags( defineMergeFlags(debugLevel) ) diff --git a/UnitTests/SConscript b/UnitTests/SConscript index f3a3e591..5b3c9d33 100644 --- a/UnitTests/SConscript +++ b/UnitTests/SConscript @@ -27,7 +27,9 @@ linkLists = { helper.make_unit_tests ( linkLists ) -helper.run_unit_tests() +if env['RUNTESTS']: + print ("Running unit tests" ) + helper.run_unit_tests() # This tells emacs to view this file in python mode. From b4a61b6109447cd0d7d66e933f7357a5a4a25465 Mon Sep 17 00:00:00 2001 From: Rob Kutschke Date: Mon, 17 Feb 2020 13:21:07 -0600 Subject: [PATCH 2/2] Use ln -s not cp to put SConstruct in the build area. --- scripts/newBuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/newBuild.sh b/scripts/newBuild.sh index f237606e..9514dc79 100644 --- a/scripts/newBuild.sh +++ b/scripts/newBuild.sh @@ -46,7 +46,7 @@ fi package_source=`cd "$(dirname ${BASH_SOURCE})" >/dev/null 2>&1 && /bin/pwd | sed -e 's|/scripts$||' ` echo $package_source -cp ${package_source}/SConstruct . +ln -s ${package_source}/SConstruct . cat >> setup.sh <