From 69b27627a1181ee16ce7ea5c14741e06e397cb9e Mon Sep 17 00:00:00 2001 From: ThomasRoehl Date: Thu, 22 Feb 2018 14:43:40 +0100 Subject: [PATCH] add a script to continue testing from the point where it crashed --- .scripts/continueTesting.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 .scripts/continueTesting.sh diff --git a/.scripts/continueTesting.sh b/.scripts/continueTesting.sh new file mode 100755 index 000000000000..e03cca19add7 --- /dev/null +++ b/.scripts/continueTesting.sh @@ -0,0 +1,33 @@ +#!/bin/bash +tmpPath=tests/end-to-end/temporary_staged_test +stopfile=`find ${tmpPath} -type f | head -1` +echo 'Last stop at:' $stopfile +[ -z "$retry_test" ] && retry_test=1 +stopfile=`find ${tmpPath} -type f | head -1` +array=(`find tests/end-to-end/*/*.js -type f`) + +for j in ${!array[@]}; do + file=${array[$j]} + [[ ${stopfile##*/} == ${file##*/} ]] && [[ $stopfile != $file ]] && break +done + +rm -rf $tmpPath +mkdir -p $tmpPath +for file in ${array[@]:$j}; do + failed=1 + for i in `seq 1 $retry_test`; do + echo '-------------- '$i' try ---------------' + set -x + cp $file $tmpPath + CHIMP_PATH=$tmpPath meteor npm run chimp-path + failed=$? + set +x + if [ $failed -eq 0 ]; then + break + fi + done + if [ $failed -ne 0 ]; then + exit 1 + fi + rm $tmpPath/${file##*/} +done \ No newline at end of file