svn commit: r1934945 - httpd/httpd/trunk/test/pytest_suite
| Newsgroups | gmane.comp.apache.cvs |
|---|---|
| Message-ID | <178051353180.2491244.913528109074653421@svn03-he-fi> |
Author: jim
Date: Wed Jun 3 19:05:31 2026
New Revision: 1934945
Log:
test/pytest_suite: auto-create .venv via python3+pip when uv is unavailable
runtests.sh already bootstrapped the virtualenv with `uv sync` when uv
was present, but exited with an error when it was not. Fall back to
`python3 -m venv .venv && .venv/bin/pip install -e .` so the suite is
self-bootstrapping on systems that have only a stock Python 3 install.
Modified:
httpd/httpd/trunk/test/pytest_suite/runtests.sh
Modified: httpd/httpd/trunk/test/pytest_suite/runtests.sh
==============================================================================
--- httpd/httpd/trunk/test/pytest_suite/runtests.sh Wed Jun 3 19:02:13 2026 (r1934944)
+++ httpd/httpd/trunk/test/pytest_suite/runtests.sh Wed Jun 3 19:05:31 2026 (r1934945)
@@ -35,11 +35,12 @@ if [ ! -x "$PYTEST" ]; then
if command -v uv >/dev/null 2>&1; then
echo "runtests.sh: .venv not found; running 'uv sync' to create it..." >&2
uv sync
+ elif command -v python3 >/dev/null 2>&1; then
+ echo "runtests.sh: .venv not found; creating it with python3 + pip..." >&2
+ python3 -m venv .venv
+ .venv/bin/pip install --quiet -e .
else
- echo "runtests.sh: ERROR: $PYTEST not found and 'uv' is not installed." >&2
- echo " Create the environment with one of:" >&2
- echo " uv sync" >&2
- echo " python3 -m venv .venv && .venv/bin/pip install pytest httpx" >&2
+ echo "runtests.sh: ERROR: $PYTEST not found and neither 'uv' nor 'python3' is installed." >&2
exit 1
fi
fi