summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Burke <jburke@redhat.com>2006-09-15 18:21:01 +0000
committerJeff Burke <jburke@redhat.com>2006-09-15 18:21:01 +0000
commit367cebea5681d741546ee76890cb9e84c761fdc6 (patch)
tree8238959eff6089866dee21540c9a044caf6d8b80
parentca23ffae615387b168fe6f1a1c91b01a2f27c5c5 (diff)
Add in a script to return system earlyrh-tests-distribution-reservesys-1_0-5
-rwxr-xr-xTasks/distribution/reservesys/runtest.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/Tasks/distribution/reservesys/runtest.sh b/Tasks/distribution/reservesys/runtest.sh
index dde11ec..46db405 100755
--- a/Tasks/distribution/reservesys/runtest.sh
+++ b/Tasks/distribution/reservesys/runtest.sh
@@ -23,6 +23,8 @@ MOTD()
echo "** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **" > $FILE
echo " This System is reserved by $SUBMITTER. " >> $FILE
echo " " >> $FILE
+ echo " To return this system early. You can run the command: return2rhts.sh " >> $FILE
+ echo " Ensure you have your logs off the system before returning to RHTS " >> $FILE
echo " " >> $FILE
echo " RHTS Test information: " >> $FILE
echo " HOSTNAME=$HOSTNAME " >> $FILE
@@ -34,6 +36,32 @@ MOTD()
echo "** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **" >> $FILE
}
+RETURNSCRIPT()
+{
+ SCRIPT=/usr/bin/return2rhts.sh
+
+ echo "#!/bin/sh" > $SCRIPT
+ echo "export JOBID=$JOBID" >> $SCRIPT
+ echo "export RECIPESETID=$RECIPETESTID" >> $SCRIPT
+ echo "export RECIPETYPE=$RECIPETYPE" >> $SCRIPT
+ echo "export RECIPEID=$RECIPEID" >> $SCRIPT
+ echo "export HOSTNAME=$HOSTNAME" >> $SCRIPT
+ echo "export UUID=$UUID" >> $SCRIPT
+ echo "export LAB_SERVER=$LAB_SERVER" >> $SCRIPT
+ echo "export RESULT_SERVER=$RESULT_SERVER" >> $SCRIPT
+ echo "export TEST=$TEST" >> $SCRIPT
+ echo "export TESTPATH=$TESTPATH" >> $SCRIPT
+ echo "export TESTID=$TESTID" >> $SCRIPT
+ echo "export STANDALONE=$STANDALONE" >> $SCRIPT
+ echo "rhts_sync_set -s DONE" >> $SCRIPT
+ echo "rhts_sync_block -s DONE $STANDALONE" >> $SCRIPT
+ echo "rhts_test_update.py $RESULT_SERVER $TESTID finish_time" >> $SCRIPT
+ echo "rhts_recipe_update.py $RESULT_SERVER $RECIPEID finish_recipe" >> $SCRIPT
+ echo "rhts_end_testing.py $LAB_SERVER $HOSTNAME $RECIPEID $UUID" >> $SCRIPT
+
+ chmod 777 $SCRIPT
+}
+
NOTIFY()
{
mail -s "$HOSTNAME" $SUBMITTER < /etc/motd
@@ -64,6 +92,8 @@ NOTIFY
WATCHDOG
+RETURNSCRIPT
+
/sbin/service rhts stop
echo "***** End of reservesys test *****" >> $OUTPUTFILE