Skip to content

Commit 6751abd

Browse files
committed
port runtox
1 parent 2210818 commit 6751abd

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

scripts/runtox.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,13 @@
55

66
set -ex
77

8-
if [ -n "$TOXPATH" ]; then
9-
true
10-
elif which tox &> /dev/null; then
11-
TOXPATH=tox
12-
else
13-
TOXPATH=./.venv/bin/tox
14-
fi
15-
168
searchstring="$1"
179

1810
# Filter out -latest environments unless explicitly requested
1911
if [[ "$searchstring" == *-latest* ]]; then
20-
ENV="$($TOXPATH -l | grep -- "$searchstring" | tr $'\n' ',')"
12+
ENV="$(uv run tox -l | grep -- "$searchstring" | tr $'\n' ',')"
2113
else
22-
ENV="$($TOXPATH -l | grep -- "$searchstring" | grep -v -- '-latest$' | tr $'\n' ',')"
14+
ENV="$(uv run tox -l | grep -- "$searchstring" | grep -v -- '-latest$' | tr $'\n' ',')"
2315
fi
2416

2517
if [ -z "${ENV}" ]; then
@@ -30,7 +22,7 @@ fi
3022
# Django ASGI tests deadlock under tox's parallel env scheduler when multiple
3123
# Django envs share the same Postgres service container. Run those serially.
3224
if [[ "$searchstring" == *-django* ]]; then
33-
exec $TOXPATH -e "$ENV" -- "${@:2}"
25+
exec uv run tox -e "$ENV" -- "${@:2}"
3426
else
35-
exec $TOXPATH -p auto -o -e "$ENV" -- "${@:2}"
27+
exec uv run tox -p auto -o -e "$ENV" -- "${@:2}"
3628
fi

0 commit comments

Comments
 (0)