From 1f7dc58ee1eee1ea051ad85c02dcf79e519782f9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Thu, 10 Nov 2011 11:21:56 +0000 Subject: [PATCH] Deployment section header is now generated by a common function in the L&B suite --- .../gridsite/tests/gridsite-autonomous-test.sh | 43 ++++++++-------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/org.glite.testsuites.ctb/gridsite/tests/gridsite-autonomous-test.sh b/org.glite.testsuites.ctb/gridsite/tests/gridsite-autonomous-test.sh index ce6b935..403f23c 100755 --- a/org.glite.testsuites.ctb/gridsite/tests/gridsite-autonomous-test.sh +++ b/org.glite.testsuites.ctb/gridsite/tests/gridsite-autonomous-test.sh @@ -37,6 +37,8 @@ EndHelpHeader echo " -h | --help Show this help message." } +STARTTIME=`date +%s` + # read common definitions and functions for COMMON in gridsite-common.sh test-common.sh gridsite-common-testbeds.sh do @@ -52,8 +54,18 @@ do done source gridsite-common.sh source gridsite-common-testbeds.sh +#also read L&B common definitions for common functions. +if [ ! -r lb-common-testbeds.sh ]; then + printf "Downloading common definitions 'lb-common-testbeds.sh'" + wget -O ${COMMON} http://jra1mw.cvs.cern.ch/cgi-bin/jra1mw.cgi/org.glite.testsuites.ctb/LB/tests/lb-common-testbeds.sh?view=co > /dev/null + if [ ! -r ${COMMON} ]; then + exit 2 + else + test_done + fi +fi +source lb-common-testbeds.sh -STARTTIME=`date +%s` printf "Getting the 'install' script... " #XXX Provisional. The test won't be generated here in the future. Just downloaded or otherwise obtained @@ -87,33 +99,8 @@ test_done ENDTIME=`date +%s` -DURATION=`expr $ENDTIME - $STARTTIME` - -ISSUE=`cat /etc/issue | head -n 1` -PLATFORM=`uname -i` -TESTBED=`hostname -f` -DISTRO=`cat /etc/issue | head -n 1 | sed 's/\s.*$//'` -VERSION=`cat /etc/issue | head -n 1 | grep -E -o "[0-9]+\.[0-9]+"` -MAJOR=`echo $VERSION | sed 's/\..*$//'` - -# Generate final report snippet - -printf " ----++ $SCENARIO, $DISTRO $MAJOR - ----+++ Environment -#CleanInstallation - -Clean installation according to EMI guidelines (CA certificates, proxy certificate...). - -| OS Issue | $ISSUE | -| Platform | $PLATFORM | -| Host | $TESTBED | -| Duration | `expr $DURATION / 60` min | -| Testbed uptime | =`uptime | sed 's/^\s*//'`= | - ----++++ Process -\n" > report.twiki +#Generating report section +gen_deployment_header $ENDTIME $STARTTIME "$SCENARIO" > report.twiki cat GridSiteInstall.sh >> report.twiki printf " -- 1.8.2.3