[gs-cvs] rev 8832 - trunk/gs/toolbin
giles at ghostscript.com
giles at ghostscript.com
Fri Jul 11 11:00:14 PDT 2008
Author: giles
Date: 2008-07-11 11:00:13 -0700 (Fri, 11 Jul 2008)
New Revision: 8832
Modified:
trunk/gs/toolbin/clusterpush.sh
Log:
Check return codes of remote commands and abort if there's a problem.
Previously we continued which could confusingly return the wrong
regression report at the end if the connection drops while waiting
for the run to complete.
Modified: trunk/gs/toolbin/clusterpush.sh
===================================================================
--- trunk/gs/toolbin/clusterpush.sh 2008-07-11 05:06:07 UTC (rev 8831)
+++ trunk/gs/toolbin/clusterpush.sh 2008-07-11 18:00:13 UTC (rev 8832)
@@ -32,6 +32,10 @@
--exclude svg/obj --exclude xps/debugobj \
--exclude ufst --exclude ufst-obj \
./* $HOST:$DEST/$TARGET
+if test $? != 0; then
+ echo "$0 aborted."
+ exit 1
+fi
echo -n "Copying regression baseline"
if test -d src; then
@@ -39,14 +43,32 @@
else
LATEST=`ssh $HOST ls regression \| \
egrep 'ghostpcl-r[0-9]+\+[0-9]+' \| sort -r \| head -1`
+ if test -z "$LATEST"; then echo "$0 aborted."; exit 1; fi
fi
echo " from $LATEST..."
ssh $HOST "cp regression/$LATEST/reg_baseline.txt $DEST/$TARGET/"
+if test $? != 0; then
+ echo "$0 aborted."
+ exit 1
+fi
+
echo "Queuing regression test..."
echo "cd $DEST/$TARGET && run_regression" | ssh $HOST
+if test $? != 0; then
+ echo "$0 aborted."
+ exit 1
+fi
REPORT=`ssh $HOST ls $DEST/$TARGET \| egrep '^regression-[0-9]+.log$' \| sort -r \| head -1`
echo "Pulling $REPORT..."
scp -q $HOST:$DEST/$TARGET/$REPORT .
+if test $? != 0; then
+ echo "$0 aborted."
+ exit 1
+fi
cat $REPORT
+if test $? != 0; then
+ echo "$0 aborted."
+ exit 1
+fi
More information about the gs-cvs
mailing list