WSL/SLF GitLab Repository

Commit c0e79d81 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Add the testing scripts for the cron job. A single cron job is now necessary,...

Add the testing scripts for the cron job. A single cron job is now necessary, calling startScript.sh.
parent 4140dfa5
#!/bin/sh
#warning: the order IS important (they depend on each other)
log_echo() {
msg=$1
me=${USER}
datum=$(date "+%Y-%m-%dT%H:%M:%S")
printf "[${datum}] [${me}] ${msg}\n"
}
#get expanded path to MeteoIO's root, ie one level above this script
tmp=`dirname $0`
tmp="${tmp}/../"
cd ${tmp}
MIO_ROOT=`pwd`
cd -
#run the tests
log_echo "Starting MeteoIO testing"
cd ${MIO_ROOT}
make distclean
/usr/bin/ctest -S ${MIO_ROOT}/tests/startScriptCoverage.cmake -V > ${MIO_ROOT}/tests/startScriptCoverage.log 2>&1
make distclean
/usr/bin/ctest -S ${MIO_ROOT}/tests/startScriptNightly.cmake -V > ${MIO_ROOT}/tests/startScriptNightly.log 2>&1
make clean
/usr/bin/ctest -S ${MIO_ROOT}/tests/startScriptValgrind.cmake -V > ${MIO_ROOT}/tests/startScriptValgrind.log 2>&1
log_echo "MeteoIO testing done!"
# simple Script that makes Experimental build with cTest and publie it on CDash with coverage informations.
# This script need to be started be cron. The command for the cron is :
# "ctest -S startScriptCoverage.cmake"
# set for the thest source and binary directories
SET(CTEST_SOURCE_DIRECTORY .)
SET(CTEST_BINARY_DIRECTORY .)
# set cTest commands to be used
SET(CTEST_COMMAND "\"${CTEST_EXECUTABLE_NAME}\" -D Nightly")
#set cMake command to be used
SET(CTEST_CMAKE_COMMAND "\"${CMAKE_EXECUTABLE_NAME}\"")
#also possible to set initial cache values for config to set that the test are build
# BUILD NAME SET HERE DROUG CACHE.. OLD WAY TO OD BUT ONLY WORKING WAY
SET(CTEST_INITIAL_CACHE "
BUILD_TESTING:BOOL=ON
BUILD_TESTING_WITH_COVERAGE:BOOL=ON
BUILDNAME:STRING=Linux_Coverage_noOptim
")
# simple Script that makes Nighty build with cTest and publie it on CDash.
# This script need to be started be cron. The command for the cron is :
# "ctest -S startScripNighty.cmake"
# set for the thest source and binary directories
SET(CTEST_SOURCE_DIRECTORY .)
SET(CTEST_BINARY_DIRECTORY .)
# set cTest commands to be used
SET(CTEST_COMMAND "\"${CTEST_EXECUTABLE_NAME}\" -D Nightly")
#set cMake command to be used
SET(CTEST_CMAKE_COMMAND "\"${CMAKE_EXECUTABLE_NAME}\"")
#also possible to set initial cache values for config to set that the test are build
# BUILD NAME SET HERE DROUG CACHE.. OLD WAY TO OD BUT ONLY WORKING WAY
SET(CTEST_INITIAL_CACHE "
BUILD_TESTING:BOOL=ON
BUILD_TESTING_WITH_COVERAGE:BOOL=OFF
BUILDNAME:STRING=Linux_Standart
")
# simple Script that makes Nigthly build with cTest and publie it on CDash with valgrind informations.
# This script need to be started be cron. The command for the cron is [see next section]:
# "ctest -S startScriptValgrind.cmake"
# Set Information for build
SET(CTEST_SITE "olmenhorn")
SET(CTEST_BUILD_NAME "Linux_Standart_Valgrind")
SET(CTEST_BUILD_CONFIGURATION "release")
# set for the thest source and binary directories
SET(CTEST_SOURCE_DIRECTORY .)
SET(CTEST_BINARY_DIRECTORY .)
# set SVN command
SET(CTEST_SVN_COMMAND /usr/bin/svn)
# set Generator
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
#Configure valgrind
SET(CTEST_MEMORYCHECK_COMMAND "/usr/bin/valgrind")
#SET(CTEST_MEMORYCHECK_COMMAND_OPTIONS ) # activate this if would specivie other then default valgrind options
#SET(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE) # to say, what valgrind should not "test" ;-), filter out the false positive errors of valgrind
#set cMake command to be used
SET(CTEST_CMAKE_COMMAND "\"${CMAKE_EXECUTABLE_NAME}\"")
#also possible to set initial cache values for config to set that the test are build
# BUILD NAME SET HERE DROUG CACHE.. OLD WAY TO OD BUT ONLY WORKING WAY
SET(CTEST_INITIAL_CACHE "
BUILD_TESTING:BOOL=ON
BUILD_TESTING_WITH_COVERAGE:BOOL=OFF
")
ctest_start(Nightly)
ctest_update(SOURCE "${CTEST_SOURCE_DIRECORTY}")
ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_memcheck(BUILD "${CTEST_BINARY_DIRECTORY}" )
ctest_submit()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment