TODO: script: add test-loop.sh: loop over make test TESTS=<pat> until failure occurs
authorMichael Adam <obnox@samba.org>
Wed, 20 Aug 2014 16:47:34 +0000 (18:47 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 22 Dec 2014 08:51:45 +0000 (09:51 +0100)
call:

TESTS="pattern" ./test-loop.sh

script/test-loop.sh [new file with mode: 0755]

diff --git a/script/test-loop.sh b/script/test-loop.sh
new file mode 100755 (executable)
index 0000000..26649ef
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+buildnice ./configure.developer
+buildnice make -j
+
+SMBD_OPT='SMBD_OPTIONS="-d10"'
+SMBD_OPT=''
+
+#TESTS="samba3.base.defer_open.*s3dc"
+
+COUNT=1
+
+LOGBASE="./test.loop"
+
+while true ; do
+       echo
+       echo " === ${COUNT} ==="
+       echo
+       LOGF="${LOGBASE}.${COUNT}"
+       rm -f "${LOGF}"
+       buildnice make test ${SMBD_OPT} TESTS="'$TESTS'" 2>&1 | tee "${LOGF}"
+       grep -q FAIL "${LOGF}" && break
+       rm -f "${LOGF}"
+       sleep 1
+       COUNT=$((COUNT + 1))
+done