Skip to content

Commit f89e866

Browse files
committed
cleanup
1 parent 5ad52b3 commit f89e866

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

.evergreen/install-dependencies.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ cp ${PROJECT_DIRECTORY}/test/certificates/* ${DRIVERS_TOOLS}/.evergreen/x509gen/
77
# Replace MongoOrchestration's client certificate.
88
cp ${PROJECT_DIRECTORY}/test/certificates/client.pem ${MONGO_ORCHESTRATION_HOME}/lib/client.pem
99

10-
# Ensure hatch is installed.
11-
bash ${PROJECT_DIRECTORY}/.evergreen/scripts/ensure-hatch.sh
12-
1310
if [ -w /etc/hosts ]; then
1411
SUDO=""
1512
else

.evergreen/scripts/ensure-hatch.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -eu
44

5+
HERE=$(dirname ${BASH_SOURCE:-$0})
6+
pushd "$(dirname "$(dirname $HERE)")" > /dev/null
7+
58
# Ensure hatch is available.
69
if [ ! -x "$(command -v hatch)" ]; then
710
# Install a virtual env with "hatch"
@@ -53,3 +56,4 @@ if [ ! -x "$(command -v hatch)" ]; then
5356
echo "Installing hatch... done."
5457
fi
5558
hatch --version
59+
popd > /dev/null

.evergreen/scripts/run-mod-wsgi-tests.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
2-
set -eux
2+
set -o xtrace
3+
set -o errexit
34

45
APACHE=$(command -v apache2 || command -v /usr/lib/apache2/mpm-prefork/apache2) || true
56
if [ -n "$APACHE" ]; then
@@ -17,13 +18,11 @@ fi
1718

1819
PYTHON_VERSION=$(${PYTHON_BINARY} -c "import sys; sys.stdout.write('.'.join(str(val) for val in sys.version_info[:2]))")
1920

20-
# Use the installed venv.
21+
# Ensure the C extensions are installed.
22+
${PYTHON_BINARY} -m venv --system-site-packages .venv
2123
source .venv/bin/activate
22-
which pip
23-
pip --version
2424
pip install -U pip
25-
pip --version
26-
python -m pip install -v -e .
25+
python -m pip install -e .
2726

2827
export MOD_WSGI_SO=/opt/python/mod_wsgi/python_version/$PYTHON_VERSION/mod_wsgi_version/$MOD_WSGI_VERSION/mod_wsgi.so
2928
export PYTHONHOME=/opt/python/$PYTHON_VERSION
@@ -49,3 +48,5 @@ python ${PROJECT_DIRECTORY}/test/mod_wsgi_test/test_client.py -n 25000 -t 100 pa
4948
python ${PROJECT_DIRECTORY}/test/mod_wsgi_test/test_client.py -n 25000 serial \
5049
http://localhost:8080/interpreter1${PROJECT_DIRECTORY} http://localhost:8080/interpreter2${PROJECT_DIRECTORY} || \
5150
(tail -n 100 error_log && exit 1)
51+
52+
rm -rf .venv

.evergreen/setup-spawn-host.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ if [ -z "$1" ]
88
fi
99

1010
target=$1
11+
remote_dir=/home/ec2-user/mongo-python-driver
1112

1213
echo "Copying files to $target..."
13-
rsync -az -e ssh --exclude '.git' --filter=':- .gitignore' -r . $target:/home/ec2-user/mongo-python-driver
14+
rsync -az -e ssh --exclude '.git' --filter=':- .gitignore' -r . $target:$remote_dir
1415
echo "Copying files to $target... done"
1516

16-
ssh $target /home/ec2-user/mongo-python-driver/.evergreen/scripts/setup-system.sh
17+
ssh $target $remote_dir/.evergreen/scripts/setup-system.sh
18+
ssh $target "PYTHON_BINARY=${PYTHON_BINARY:-} $remote_dir/.evergreen/scripts/ensure-hatch.sh"

0 commit comments

Comments
 (0)