-
Notifications
You must be signed in to change notification settings - Fork 122
/
systemtests
executable file
·73 lines (64 loc) · 3.12 KB
/
systemtests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/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 a MantidExternalData directory within the HOME directory.
# It can be overridden by setting the MANTID_DATA_STORE environment variable.
###############################################################################
if [ -z "$MANTID_DATA_STORE" ]; then
export MANTID_DATA_STORE=$HOME/MantidExternalData
fi
###############################################################################
# RHEL6 setup steps - nodes must have a "rhel6" label set (in lowercase)
###############################################################################
if [[ ${NODE_LABELS} == *rhel6* ]]; then
SCL_ON_RHEL6="scl enable mantidlibs34"
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} -DDATA_TARGETS_ONLY=ON ../Code/Mantid"
else
$SCL_ON_RHEL6 "cmake ."
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