Commit 4a1f53a8 authored by Holger Levsen's avatar Holger Levsen
Browse files

torbrowser tests: improve output, one screenshot less

parent cb7453e3
...@@ -412,8 +412,14 @@ The following ideas should really only be implemented for the new 'lvc*' tests.. ...@@ -412,8 +412,14 @@ The following ideas should really only be implemented for the new 'lvc*' tests..
=== torbrowser-launcher_* === torbrowser-launcher_*
* not sure how to test updates. maybe just run in yesterdays schroot before upgrading * test updates - add _and_upgrade to job names)
** touch -d "$(date -u -d '25 hours ago' '+%Y-%m-%d %H:%M')" $FILE
** repeat test…
* build daily from upstream master against sid no matter if there where commits
* test alpha releases * test alpha releases
** '~/.config/torbrowser/settings' file and edit the latest_version setting
** get version from '~/.cache/torbrowser/download/RecommendedTBBVersions'
** (warning: on update checks these files are written again…)
* notifications should go somewhere public, after a while of testing. * notifications should go somewhere public, after a while of testing.
* debug why iceweasel is needed to be installed… and ca-certificates too. * debug why iceweasel is needed to be installed… and ca-certificates too.
* run this in qemu and enable apparmor too? * run this in qemu and enable apparmor too?
......
...@@ -45,7 +45,7 @@ cleanup_all() { ...@@ -45,7 +45,7 @@ cleanup_all() {
cleanup_duplicate_screenshots() { cleanup_duplicate_screenshots() {
cd $RESULTS cd $RESULTS
echo "$(date -u) - removing duplicate screenshots." echo "$(date -u) - removing duplicate and similar creenshots."
# loop backwards through the screenshots and remove similar ones # loop backwards through the screenshots and remove similar ones
# this results in keeping the interesting ones :) # this results in keeping the interesting ones :)
MAXDIFF=2500 # pixels MAXDIFF=2500 # pixels
...@@ -60,7 +60,7 @@ cleanup_duplicate_screenshots() { ...@@ -60,7 +60,7 @@ cleanup_duplicate_screenshots() {
PIXELS=$(compare -metric AE $i $j /dev/null 2>&1 || true) PIXELS=$(compare -metric AE $i $j /dev/null 2>&1 || true)
# if it's an integer… # if it's an integer…
if [[ "$PIXELS" =~ ^[0-9]+$ ]] && [ $PIXELS -le $MAXDIFF ] ; then if [[ "$PIXELS" =~ ^[0-9]+$ ]] && [ $PIXELS -le $MAXDIFF ] ; then
echo "$(date -u ) - removing $j, just $PIXELS pixels difference." echo "$(date -u ) - removing $j, $PIXELS pixels difference."
rm $j rm $j
fi fi
done done
...@@ -219,8 +219,8 @@ download_and_launch() { ...@@ -219,8 +219,8 @@ download_and_launch() {
cleanup_duplicate_screenshots cleanup_duplicate_screenshots
exit 1 exit 1
fi fi
echo "$(date -u) - waiting for torbrowser to start." echo "$(date -u) - waiting for torbrowser to start the tor network settings dialogue."
# allow up to 63 seconds for torbrowser to start # allow up to 63 seconds for torbrowser to start the tor network settings dialogue
for i in $(seq 1 7) ; do for i in $(seq 1 7) ; do
sleep 5 ; sleep $i sleep 5 ; sleep $i
# this directory only exists once torbrower has successfully started # this directory only exists once torbrower has successfully started
...@@ -229,7 +229,6 @@ download_and_launch() { ...@@ -229,7 +229,6 @@ download_and_launch() {
STATUS="$(schroot --run-session -c $SESSION -- test ! -d $BROWSER_DIR_EN/$BROWSER_PROFILE -a ! -d $BROWSER_DIR_DE/$BROWSER_PROFILE || echo $(date -u ) - torbrowser running. )" STATUS="$(schroot --run-session -c $SESSION -- test ! -d $BROWSER_DIR_EN/$BROWSER_PROFILE -a ! -d $BROWSER_DIR_DE/$BROWSER_PROFILE || echo $(date -u ) - torbrowser running. )"
if [ -n "$STATUS" ] ; then if [ -n "$STATUS" ] ; then
sleep 10 sleep 10
update_screenshot
break break
fi fi
done done
...@@ -249,7 +248,7 @@ download_and_launch() { ...@@ -249,7 +248,7 @@ download_and_launch() {
update_screenshot update_screenshot
TOR_RUNNING=$(gocr $WORKSPACE/screenshot.png 2>/dev/null | egrep "(Search securely|Tor Is NOT all you need to browse|There are many ways you can help)" || true) TOR_RUNNING=$(gocr $WORKSPACE/screenshot.png 2>/dev/null | egrep "(Search securely|Tor Is NOT all you need to browse|There are many ways you can help)" || true)
if [ -n "$TOR_RUNNING" ] ; then if [ -n "$TOR_RUNNING" ] ; then
echo "$(date -u) - torbrowser is working is it should, good." echo "$(date -u) - torbrowser is working as it should, good."
break break
fi fi
done done
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment