Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a driver script for the system tests
Avoids duplication of job configuration on the server. Refs #10870
- Loading branch information
1 parent
be9daee
commit f1ba93a
Showing
2 changed files
with
73 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/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 | ||
|