diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-11-19 02:52:02 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-11-19 03:51:34 +0100 |
commit | 1249760ad127dec5b3155753a35ab3589b1bcd5b (patch) | |
tree | 65b10ceceb9347bc49b7212c92a6789025fb908f | |
parent | ed4192bf85162cfbdbacf4a9b009c61dfd076965 (diff) | |
download | jenkins.debian.net-1249760ad127dec5b3155753a35ab3589b1bcd5b.tar.xz |
torbrowser tests: refactor
-rwxr-xr-x | bin/test_torbrowser-launcher.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/test_torbrowser-launcher.sh b/bin/test_torbrowser-launcher.sh index e81f27cf..9f32182a 100755 --- a/bin/test_torbrowser-launcher.sh +++ b/bin/test_torbrowser-launcher.sh @@ -200,10 +200,12 @@ download_and_launch() { cleanup_duplicate_screenshots exit 1 fi - # this directory only exists once torbrower has been successfully installed + # download is finished once BROWSER_DIR_EN or BROWSER_DIR_DE exist + # as these directories only exist once torbrower has been successfully installed # (and pattern matching doesnt work because of schroot…) - - STATUS="$(schroot --run-session -c $SESSION -- test ! -d $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser -a ! -d $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_de/Browser || echo $(date -u ) - torbrowser downloaded and installed, configuring tor now. )" + local BROWSER_DIR_EN=$HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser + local BROWSER_DIR_DE=$HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_de/Browser + STATUS="$(schroot --run-session -c $SESSION -- test ! -d $BROWSER_DIR_EN -a ! -d $BROWSER_DIR_DE || echo $(date -u ) - torbrowser downloaded and installed, configuring tor now. )" if [ -n "$STATUS" ] ; then update_screenshot break @@ -217,11 +219,13 @@ download_and_launch() { exit 1 fi echo "$(date -u) - waiting for torbrowser to start." + # allow up to 60 seconds for torbrowser to start for i in $(seq 1 6) ; do sleep 10 # this directory only exists once torbrower has successfully started # (and pattern matching doesnt work because of schroot…) - STATUS="$(schroot --run-session -c $SESSION -- test ! -d $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/profile.default -a ! -d $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_de/Browser/TorBrowser/Data/Browser/profile.default || echo $(date -u ) - torbrowser running. )" + local BROWSER_PROFILE=TorBrowser/Data/Browser/profile.default + 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 sleep 10 update_screenshot |