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 <thanh.ha@linuxfoundation.org>
     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"
 
     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"
 
     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"