ci-linux-test.sh 1.31 KB
Newer Older
1 2 3 4 5 6 7 8
#!/bin/bash

# Script abort on error
set -e

# Expected Settings via environment variables:
# COMPILER= gcc/clang
# LANGUAGE= C++98 / C++11
9
# QTVERSION= QT5
10
# BUILDTYPE= Debug / Release
11 12 13

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

16 17 18 19
# copy artifact files to toplevel and remove subdirectory
rsync -a $MY_DIR/.. $MY_DIR/../..
rm -rf artifacts

20 21 22 23 24 25 26 27 28 29 30
########################################
# Fetch test data
########################################
rm -rf TestData
git clone git@roosevelt:moebius/OpenFlipper-Test-Data.git TestData

#########################################
# Run Release Unittests
#########################################

# Run tests
31
cd $BUILDPATH
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

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

#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

47
cmake -DOPENFLIPPER_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
48 49 50 51 52 53 54 55 56 57

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

#make test

cd tests
bash run_tests.sh

58
cd ..