- # 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"
+PARALLEL="${PARALLEL:-true}"
+if [ "${PARALLEL}" = true ]; then
+ if [ ! -z "$TOX_ENVS" ]; then
+ detox -e "$TOX_ENVS" | tee -a "$ARCHIVE_TOX_DIR/detox.log"
+ tox_status="${PIPESTATUS[0]}"
+ else
+ detox | tee -a "$ARCHIVE_TOX_DIR/detox.log"
+ tox_status="${PIPESTATUS[0]}"