From 554a48495c1efc9dd1b1a5be41f2aeb9acc29707 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 16 Nov 2015 22:40:13 +0100 Subject: torbrowser tests: delete similar images more aggressivly, but backwards --- bin/test_torbrowser-launcher.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh index 300c2502..9938a513 100755 --- a/bin/test_torbrowser-launcher.sh +++ b/bin/test_torbrowser-launcher.sh @@ -41,12 +41,14 @@ cleanup_all() { cleanup_duplicate_screenshots() { echo "$(date -u) - removing duplicate screenshots." - MAXDIFF=250 # pixels + MAXDIFF=2500 # pixels cd $RESULTS - for i in *.png ; do - for j in *.png ; do + for i in $(ls -r1 *.png | xargs echo) ; do + for j in $(ls -r1 *.png | xargs echo) ; do if [ "$j" = "$i" ] ; then break + elif [ ! -f $j ] || [ ! -f $i ] ; then + break fi PIXELS=$(compare -metric AE $i $j /dev/null 2>&1 || true) if [[ "$PIXELS" =~ ^[0-9]+$ ]] && [ $PIXELS -le $MAXDIFF ] ; then @@ -160,8 +162,8 @@ download_and_launch() { cleanup_duplicate_screenshots exit 1 fi - for i in $(seq 1 20) ; do - sleep 30 + for i in $(seq 1 40) ; do + sleep 15 STATUS="$(grep '^Download error:' $TBL_LOGFILE || true)" if [ -n "$STATUS" ] ; then echo "'$(date -u) - $STATUS'" | tee | xargs schroot --run-session -c $SESSION --preserve-environment -- notify-send -u critical -- cgit v1.2.3-70-g09d2