From 84ebcb336c922492c53bd128d8d4667a8fbff84c Mon Sep 17 00:00:00 2001 From: Owen Arnold <owen.arnold@stfc.ac.uk> Date: Sun, 31 Oct 2010 21:02:00 +0000 Subject: [PATCH] refs #1642 Linux gcc 4.4.5 modifications --- Code/Mantid/MDAlgorithms/test/runTests.sh | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 Code/Mantid/MDAlgorithms/test/runTests.sh diff --git a/Code/Mantid/MDAlgorithms/test/runTests.sh b/Code/Mantid/MDAlgorithms/test/runTests.sh new file mode 100755 index 00000000000..da8f90164f7 --- /dev/null +++ b/Code/Mantid/MDAlgorithms/test/runTests.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Simple script to build and run the tests. +# Will run all tests in the directory if no arguments are supplied, +# or alternatively just the test files given as arguments. +# +# You will need to have the directories containing the Mantid +# .so libraries in your LD_LIBRARY_PATH environment variable +# +# Author: Owen Arnold 31/10/2010 +# + +# Clean up any old executable +rm -rf runner.* + +echo "Generating the source file from the test header files..." +# Chaining all tests together can have effects that you don't think of +# - it's always a good idea to run your new/changed test on its own +test_files="" +if [ $# -eq 0 ]; then + test_files=*.h +else + test_files=$* +fi + +cxxtestgen=../../../Third_Party/src/cxxtest/cxxtestgen.py +python $cxxtestgen --runner=MantidPrinter -o runner.cpp $test_files +echo + +echo "Compiling the test executable..." +mantid_libpath=../../debug +g++ -O0 -g3 -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -o runner.exe runner.cpp -I../../Kernel/inc -I../inc/MantidMDAlgorithms -I../../API/inc -I../../Geometry/inc -I ../inc \ + -I ../../../Third_Party/src/cxxtest -I ../../../Third_Party/include \ + -L$mantid_libpath -lMantidKernel -lMantidGeometry -lMantidAPI -lboost_date_time -lgmock -lMDAlgorithms +echo + +echo "Running the tests..." +ln ../../Build/Tests/*.properties . +LD_LIBRARY_PATH=$mantid_libpath:$LD_LIBRARY_PATH ./runner.exe +echo + +# Remove the generated files to ensure that they're not inadvertently run +# when something in the chain has failed. +echo "Cleaning up..." +rm -f *.properties +rm -f *Test.log +echo "Done." -- GitLab