From 7d46c8d255a2d6763f024c1a6e85c3bbad8bacb2 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Tue, 1 Aug 2017 12:34:43 +0000 Subject: [PATCH] Allow validate to run as root in a non-interactive shell --- SubSystems/Online_Cobalt/validation/validate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SubSystems/Online_Cobalt/validation/validate b/SubSystems/Online_Cobalt/validation/validate index 98a2ced25ee..42756cf710c 100755 --- a/SubSystems/Online_Cobalt/validation/validate +++ b/SubSystems/Online_Cobalt/validation/validate @@ -24,8 +24,8 @@ function runTest() { echo " Time: `date +"%F %T"`" echo "----------------------------------------------------------------" - if [ "${TEST%%.root.test}" == "${TEST}" ]; then - bash -v $TEST + if [ "${TEST%%.root.test}" == "${TEST}" -o `id -u` == 0 ]; then + ssh -tt localhost "cd $PWD && bash -v $TEST" # need an interactive shell for sudo inside the test scripts RESULT=$? else if [ $CAN_SUDO -eq 0 ]; then -- GitLab