#!/bin/sh
+#
+# Copyright (C) 2000-2015 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+
#
# run both the disk and the tape based regression tests.
#
# Include full output
-save_debug=${REGRESS_DEBUG}
+LANG=C
+echo "Begin nightly-all `date`"
REGRESS_DEBUG=1
export REGRESS_DEBUG
-svn update
+rm -rf Testing
+rm -f dumps/*
+git pull
+make distclean
scripts/config_dart
nice ctest -D Nightly -R "^(disk|tape|changer):"
-if [ $? != 0 ] ; then
+rtn=$?
+i=0
+while [ $i -le 5 ]; do
+ if [ $rtn = 0 ] || [ "$rtn" = "8" ] ; then
+ break;
+ fi
+ echo "Submit failed, waiting 5 mins"
+ sleep 300
echo "ctest failed re-running Submit"
ctest -D NightlySubmit
- if [ $? != 0 ] ; then
- echo "Submit failed, waiting 5 mins"
- sleep 300
- echo "ctest failed re-running Submit a second time"
- ctest -D NightlySubmit
- fi
-fi
-REGRESS_DEBUG=${save_debug}
+ rtn=$?
+ i=`expr $i + 1`
+done
+echo "End nightly-all `date`"