From 5d8b4336f25ce2987fd071d3ebd5b17f1c697478 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 14 Jun 2024 20:11:21 -0500 Subject: [PATCH] PYTHON-4504 [v4.8] Update mod_wsgi test to not call setup.py (#1684) (#1686) --- .evergreen/run-import-time-test.sh | 2 ++ .evergreen/run-mod-wsgi-tests.sh | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.evergreen/run-import-time-test.sh b/.evergreen/run-import-time-test.sh index f013eb115c..2b17f5ffeb 100755 --- a/.evergreen/run-import-time-test.sh +++ b/.evergreen/run-import-time-test.sh @@ -25,7 +25,9 @@ function get_import_time() { } get_import_time $HEAD_SHA +git stash git checkout $BASE_SHA get_import_time $BASE_SHA git checkout $HEAD_SHA +git stash apply python tools/compare_import_time.py $HEAD_SHA $BASE_SHA diff --git a/.evergreen/run-mod-wsgi-tests.sh b/.evergreen/run-mod-wsgi-tests.sh index afb3f271ae..e1f5238110 100644 --- a/.evergreen/run-mod-wsgi-tests.sh +++ b/.evergreen/run-mod-wsgi-tests.sh @@ -19,7 +19,10 @@ fi PYTHON_VERSION=$(${PYTHON_BINARY} -c "import sys; sys.stdout.write('.'.join(str(val) for val in sys.version_info[:2]))") # Ensure the C extensions are installed. -${PYTHON_BINARY} setup.py build_ext -i +${PYTHON_BINARY} -m venv --system-site-packages .venv +source .venv/bin/activate +pip install -U pip +python -m pip install -e . export MOD_WSGI_SO=/opt/python/mod_wsgi/python_version/$PYTHON_VERSION/mod_wsgi_version/$MOD_WSGI_VERSION/mod_wsgi.so export PYTHONHOME=/opt/python/$PYTHON_VERSION @@ -38,10 +41,12 @@ trap '$APACHE -k stop -f ${PROJECT_DIRECTORY}/test/mod_wsgi_test/${APACHE_CONFIG wget -t 1 -T 10 -O - "http://localhost:8080/interpreter1${PROJECT_DIRECTORY}" || (cat error_log && exit 1) wget -t 1 -T 10 -O - "http://localhost:8080/interpreter2${PROJECT_DIRECTORY}" || (cat error_log && exit 1) -${PYTHON_BINARY} ${PROJECT_DIRECTORY}/test/mod_wsgi_test/test_client.py -n 25000 -t 100 parallel \ +python ${PROJECT_DIRECTORY}/test/mod_wsgi_test/test_client.py -n 25000 -t 100 parallel \ http://localhost:8080/interpreter1${PROJECT_DIRECTORY} http://localhost:8080/interpreter2${PROJECT_DIRECTORY} || \ (tail -n 100 error_log && exit 1) -${PYTHON_BINARY} ${PROJECT_DIRECTORY}/test/mod_wsgi_test/test_client.py -n 25000 serial \ +python ${PROJECT_DIRECTORY}/test/mod_wsgi_test/test_client.py -n 25000 serial \ http://localhost:8080/interpreter1${PROJECT_DIRECTORY} http://localhost:8080/interpreter2${PROJECT_DIRECTORY} || \ (tail -n 100 error_log && exit 1) + +rm -rf .venv