Skip to content
Snippets Groups Projects
Commit f1ba93a9 authored by Gigg, Martyn Anthony's avatar Gigg, Martyn Anthony
Browse files

Use a driver script for the system tests

Avoids duplication of job configuration on the server.
Refs #10870
parent be9daee5
No related merge requests found
......@@ -9,6 +9,7 @@
# BUILD_THREADS & PARAVIEW_DIR should be set in the configuration of each
# slave.
###############################################################################
SCRIPT_DIR=$(dirname $(readlink -f "$0"))
###############################################################################
# Print out the versions of things we are using
......@@ -203,10 +204,5 @@ fi
# from a package to have at least one Linux checks it install okay
###############################################################################
if [[ "${ON_RHEL6}" == true ]] && [[ ${JOB_NAME} == *pull_requests* ]]; then
PKGDIR=${WORKSPACE}/build
# Turn off usage reports and instrument downloading for the mantid call
# that creates the properties file
echo "UpdateInstrumentDefinitions.OnStartup = 0" > $userprops
echo "usagereports.enabled = 0" >> $userprops
python $WORKSPACE/Code/Mantid/Testing/SystemTests/scripts/InstallerTesting.py -o -d $PKGDIR
$SCRIPT_DIR/systemtests
fi
#!/bin/bash -ex
###############################################################################
# LINUX/MAC SCRIPT TO DRIVE THE SYSTEM TESTS OF MANTID
#
# Notes:
#
# WORKSPACE, JOB_NAME, NODE_LABEL GIT_COMMIT are environment variables that
# are set by Jenkins. The last one corresponds to any labels set on a slave.
###############################################################################
###############################################################################
# Print out the versions of things we are using
###############################################################################
cmake --version
echo "SHA1=${sha1}"
###############################################################################
# Set up the location for the local object store outside of the build and
# source tree, which can be shared by multiple builds.
# It defaults to the parent directory of the workspace but can be overridden
# by setting the MANTID_DATA_STORE environment variable.
###############################################################################
if [ -z "$MANTID_DATA_STORE" ]; then
export MANTID_DATA_STORE=$(dirname $WORKSPACE)
fi
###############################################################################
# RHEL6 setup steps - nodes must have a "rhel6" label set (in lowercase)
###############################################################################
if [[ ${NODE_LABELS} == *rhel6* ]]; then
SCL_ON_RHEL6="scl enable mantidlibs"
ON_RHEL6=true
else
SCL_ON_RHEL6="eval"
fi
###############################################################################
# Create the build directory if it doesn't exist
###############################################################################
[ -d $WORKSPACE/build ] || mkdir $WORKSPACE/build
cd $WORKSPACE/build
###############################################################################
# CMake configuration if it has not already been configured
# We use the special flag that only creates the targets for the data
###############################################################################
if [[ ! -e $WORKSPACE/build/CMakeCache.txt ]]; then
$SCL_ON_RHEL6 "cmake -DMANTID_DATA_STORE=${MANTID_DATA_STORE} -DTESTING_DATA_ONLY=ON ../Code/Mantid"
fi
###############################################################################
# Build step
###############################################################################
$SCL_ON_RHEL6 "cmake --build . -- StandardTestData"
$SCL_ON_RHEL6 "cmake --build . -- SystemTestData"
###############################################################################
# Run the tests
###############################################################################
# Remove any Mantid.user.properties file
userprops=~/.mantid/Mantid.user.properties
rm -f $userprops
# Turn off usage reports and instrument downloading for the mantid call
# that creates the properties file
echo "UpdateInstrumentDefinitions.OnStartup = 0" > $userprops
echo "usagereports.enabled = 0" >> $userprops
# Run
PKGDIR=${WORKSPACE}/build
python $WORKSPACE/Code/Mantid/Testing/SystemTests/scripts/InstallerTests.py -o -d $PKGDIR
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