Skip to content
Snippets Groups Projects
Commit 84ebcb33 authored by Owen Arnold's avatar Owen Arnold
Browse files

refs #1642 Linux gcc 4.4.5 modifications

parent 8fc2d5f5
No related branches found
No related tags found
Loading
#!/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."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment