summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Golin <renato.golin@linaro.org>2017-09-06 17:18:11 +0100
committerRenato Golin <renato.golin@linaro.org>2017-09-06 17:18:11 +0100
commit861b4e6bb88e65088a5db4b39d93f762ccece46d (patch)
tree6f2d65d18da1b57e921d772ff61ee851ed14d52a
parentc24f14e688ebbf3505b22b53bdc482e1b759c4cc (diff)
making test run as user
Change-Id: I121ef41a35e13479f814056d763300fa7833145a
-rwxr-xr-xcentos7/01_master_pkgs.sh2
-rwxr-xr-xcentos7/09_test_suite.sh45
2 files changed, 28 insertions, 19 deletions
diff --git a/centos7/01_master_pkgs.sh b/centos7/01_master_pkgs.sh
index da20b7b..5b3bfa6 100755
--- a/centos7/01_master_pkgs.sh
+++ b/centos7/01_master_pkgs.sh
@@ -25,6 +25,8 @@ fi
yum -y install ohpc-base
yum -y install ohpc-warewulf
yum -y install ohpc-slurm-server
+# Get test-suite packages as soon as possible, to we can run the test script as a user
+yum -y install test-suite-ohpc llvm-compilers-ohpc lmod-defaults-gnu7-openmpi-ohpc
# ------------------------------------------------------------
# Add InfiniBand support services on master node (Section 4.5)
diff --git a/centos7/09_test_suite.sh b/centos7/09_test_suite.sh
index 39a50ee..9bddbc2 100755
--- a/centos7/09_test_suite.sh
+++ b/centos7/09_test_suite.sh
@@ -11,27 +11,16 @@
# WARNING: EXPERIMENTAL!
-set -ex
-
-. ./input.local
-
-if [[ ${node_is_master} -eq 0 ]]; then
- echo "This script only runs on the master node"
- exit 0
+SCRIPT=$(basename $0)
+if [ "$USER" != "ohpc-test" ]; then
+ echo "You must run as 'ohpc-test' user:"
+ echo "$ cp $SCRIPT ~ohpc-test"
+ echo "$ su - ohpc-test"
+ echo "$ ./$SCRIPT"
+ exit 2
fi
-# Install necessary packages
-yum -y install test-suite-ohpc llvm-compilers-ohpc lmod-defaults-gnu7-openmpi-ohpc
-
-# Running the test should be done as ohpc-test user, but that'd
-# complicate the script. If you're running it manualy, feel free
-# to `su - ohpc-test` before all the steps below.
-
-## Configure
-module load autotools
-cd ~ohpc-test/tests
-./bootstrap
-./configure --with-mpi-families="mpich openmpi" --disable-papi --disable-mpiP --enable-long
+set -ex
## Setup environment (future test-suite packages will fix those)
export BATS_ENABLE_TIMING=1
@@ -40,6 +29,24 @@ export BATS_JUNIT_GROUP="UserLevelTests"
export AUTOMAKE_JUNIT_FILE=1
export MANPATH=/usr/local/share/man:/usr/share/man/overrides:/usr/share/man/en:/usr/share/man
+# Prepare
+module load autotools
+cd ~/tests
+./bootstrap
+
+echo "Initial short validation, to make sure everything is up and dandy"
+
+## Configure Stage 1: Short Tests
+./configure --with-mpi-families="mpich openmpi" --disable-papi --disable-mpiP
+
+## Run!
+make -k check | tee openhpc-test-suite.log
+
+echo "Final validation, enabling all possible modules/tools"
+
+## Configure Stage 1: Long Tests
+./configure --with-mpi-families="mpich openmpi" --disable-papi --disable-mpiP --enable-long
+
## Run!
make -k check | tee openhpc-test-suite.log