test-linux.sh 1.16 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/bash

# Script abort on error
set -e

# Expected Settings via environment variables:
# COMPILER= gcc/clang
# LANGUAGE= C++98 / C++11
# QTVERSION= QT4/QT5


#include ci options script
MY_DIR=$(dirname $(readlink -f $0))
source $MY_DIR/ci-options-linux.sh
15

16 17 18 19 20 21
########################################
# Fetch test data
########################################
rm -rf TestData
git clone git@roosevelt:moebius/OpenFlipper-Test-Data.git TestData

22 23 24 25 26
#########################################
# Run Release Unittests
#########################################

# Run tests
27
cd build-release-$BUILDPATH
28 29

#clean old cmake cache as the path might have changed
30 31
find . -name "CMakeCache.txt" -type f -delete

32 33 34 35 36 37 38 39 40 41 42 43 44
#just to be safe clean the test file definitions too
if [ -f CTestTestfile.cmake ]
then
	rm CTestTestfile.cmake
fi
#just to be safe clean the test file definitions too
if [ -f DartConfiguration.tcl ]
then
	rm DartConfiguration.tcl
fi

cmake -DCMAKE_BUILD_TYPE=Release -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../

45 46 47
#tell the location to the libs from build jobs
export LD_LIBRARY_PATH=$(pwd)/Build/lib:$LD_LIBRARY_PATH

48 49
#make test

50 51 52 53
cd tests
bash run_tests.sh

cd ..