Skip to content

Commit 94ed037

Browse files
committed
disable parallel tox to avoid flaky failures
Disables parallel tox execution with standard sequential execution. Keeps comment pointing to pip bug that made us disable parallel execution. Removes bash code that was duplicating functionality parallel execution support, a feature which is part of tox, module named detox (shares same issue tracker as tox). Change-Id: I835d0b87fa74bfe0a00a6ee0deb985912129e029 See: pypa/pip#5345
1 parent 3e92c99 commit 94ed037

File tree

1 file changed

+5
-32
lines changed

1 file changed

+5
-32
lines changed

tox-gate.sh

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,9 @@
11
#!/bin/bash
22
set -x
3-
RUN_ENVS="pep8 py27 cli ansible-lint any-errors-fatal conflicts plugin-registry"
3+
export TOXENV="pep8,py27,cli,ansible-lint,any-errors-fatal,conflicts,plugin-registry"
44

5-
FAILED=""
6-
run_tox() {
7-
tox -e$1 &> .tox_$1_out &
8-
}
5+
# disabled parallel execution due to https://github.com/pypa/pip/issues/5345
6+
# which detox >/dev/null || pip install --user detox
7+
# python -m detox
98

10-
verify_tox() {
11-
if ! tail -n2 .tox_$1_out | grep -q "$1: commands succeeded"; then
12-
FAILED="${FAILED} $1"
13-
else
14-
echo -e "\033[01;33m_________ output of $1: _________\033[0m"
15-
# failed outputs printed at the end
16-
cat .tox_$1_out
17-
echo -e "\033[01;33m====== ^^ end of $1 ^^ ======\033[0m"
18-
fi
19-
}
20-
print_failed() {
21-
for tEnv in ${FAILED}; do
22-
echo -e "\033[01;33m_________ output of ${tEnv}: _________\033[0m"
23-
cat .tox_${tEnv}_out;
24-
echo -e "\033[01;31m====== ^^ end of failed ${tEnv} ^^ ======\033[0m"
25-
done
26-
}
27-
28-
for tEnv in ${RUN_ENVS}; do run_tox ${tEnv}; done
29-
wait
30-
set +x
31-
for tEnv in ${RUN_ENVS}; do verify_tox ${tEnv} || exit 1; done
32-
if [[ ! -z "$FAILED" ]]; then
33-
print_failed
34-
echo -e "\033[01;31m==== Failed: $FAILED ====\033[0m" >&2
35-
exit 1
36-
fi
9+
python -m tox

0 commit comments

Comments
 (0)