From: Thanh Ha Date: Sat, 14 Oct 2017 19:52:03 +0000 (-0400) Subject: Sleep between 1 - 10 seconds for tox X-Git-Tag: v0.10.0~10 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F6882%2F2;p=releng%2Fglobal-jjb.git Sleep between 1 - 10 seconds for tox Adds a random 1 - 10 second sleep to workaround parallel tox runs using the same sdist directory to build a package and failing due to tripping over itself. Change-Id: I5054c839dabc3fac3cc814c08bc6568f99485d0d Signed-off-by: Thanh Ha --- diff --git a/.jjb-test/expected-xml/gerrit-python-tox-verify-master b/.jjb-test/expected-xml/gerrit-python-tox-verify-master index eaaf1901..aecf9b7c 100644 --- a/.jjb-test/expected-xml/gerrit-python-tox-verify-master +++ b/.jjb-test/expected-xml/gerrit-python-tox-verify-master @@ -330,6 +330,10 @@ run_tox() { local log_dir="$1" local env="$2" + # Sleep a random 10 second interval to workaround tox sdist + # conflicts due to building in the same dist directory. + sleep $[ ( $RANDOM % 10 ) + 1 ]s + echo "-----> Running tox $env" if ! tox -e $env > "$log_dir/tox-$env.log"; then echo "$env" >> "$log_dir/failed-envs.log" diff --git a/.jjb-test/expected-xml/github-python-tox-verify-master b/.jjb-test/expected-xml/github-python-tox-verify-master index c2663421..34e8959b 100644 --- a/.jjb-test/expected-xml/github-python-tox-verify-master +++ b/.jjb-test/expected-xml/github-python-tox-verify-master @@ -292,6 +292,10 @@ run_tox() { local log_dir="$1" local env="$2" + # Sleep a random 10 second interval to workaround tox sdist + # conflicts due to building in the same dist directory. + sleep $[ ( $RANDOM % 10 ) + 1 ]s + echo "-----> Running tox $env" if ! tox -e $env > "$log_dir/tox-$env.log"; then echo "$env" >> "$log_dir/failed-envs.log" diff --git a/shell/tox-run.sh b/shell/tox-run.sh index e24e9740..3bf15760 100644 --- a/shell/tox-run.sh +++ b/shell/tox-run.sh @@ -27,6 +27,10 @@ run_tox() { local log_dir="$1" local env="$2" + # Sleep a random 10 second interval to workaround tox sdist + # conflicts due to building in the same dist directory. + sleep $[ ( $RANDOM % 10 ) + 1 ]s + echo "-----> Running tox $env" if ! tox -e $env > "$log_dir/tox-$env.log"; then echo "$env" >> "$log_dir/failed-envs.log"