Skip to content

Commit

Permalink
Merge pull request RocketChat#253 from assistify/feature/continue-tes…
Browse files Browse the repository at this point in the history
…ting-script

add a script to continue testing from the point where it crashed
  • Loading branch information
mrsimpson authored Feb 23, 2018
2 parents 5d6eed6 + 69b2762 commit 6d8c01b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .scripts/continueTesting.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6d8c01b

Please sign in to comment.