Skip to content

Commit 1596c5d

Browse files
committed
PYTHON-1390 - Switch CI OS to RHEL 6.2
1 parent 2847ef8 commit 1596c5d

File tree

4 files changed

+43
-38
lines changed

4 files changed

+43
-38
lines changed

.evergreen/config.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,7 @@ buildvariants:
10891089
- ".latest"
10901090
- ".3.4"
10911091

1092-
- matrix_name: "tests-python-version-ubuntu1204-test-ssl"
1092+
- matrix_name: "tests-python-version-rhel62-test-ssl"
10931093
matrix_spec: {"python-version": "*", auth: "*", ssl: "*", coverage: "*"}
10941094
exclude_spec:
10951095
- python-version: "*"
@@ -1106,16 +1106,16 @@ buildvariants:
11061106
auth: "*"
11071107
ssl: "ssl"
11081108
coverage: "*"
1109-
display_name: "${python-version} Ubuntu 12.04 (x86_64) ${auth} ${ssl} ${coverage}"
1110-
run_on: ubuntu1204-test
1109+
display_name: "${python-version} RHEL 6.2 (x86_64) ${auth} ${ssl} ${coverage}"
1110+
run_on: rhel62-test
11111111
tasks:
11121112
- ".latest"
11131113
- ".3.4"
11141114
- ".3.2"
11151115
- ".3.0"
11161116
- ".2.6"
11171117

1118-
- matrix_name: "tests-python-version-ubuntu1204-without-c-extensions"
1118+
- matrix_name: "tests-python-version-rhel62-without-c-extensions"
11191119
matrix_spec: {"python-version": "*", "c-extensions": "without-c-extensions", auth: "noauth", ssl: "nossl", coverage: "*"}
11201120
exclude_spec:
11211121
# These interpreters are always tested without extensions.
@@ -1124,24 +1124,24 @@ buildvariants:
11241124
auth: "*"
11251125
ssl: "*"
11261126
coverage: "*"
1127-
display_name: "${c-extensions} ${python-version} Ubuntu 12.04 (x86_64) ${auth} ${ssl} ${coverage}"
1128-
run_on: ubuntu1204-test
1127+
display_name: "${c-extensions} ${python-version} RHEL 6.2 (x86_64) ${auth} ${ssl} ${coverage}"
1128+
run_on: rhel62-test
11291129
tasks:
11301130
- ".latest"
11311131
- ".3.4"
11321132
- ".3.2"
11331133
- ".3.0"
11341134
- ".2.6"
11351135

1136-
- matrix_name: "tests-python-version-green-framework-ubuntu1204"
1136+
- matrix_name: "tests-python-version-green-framework-rhel62"
11371137
matrix_spec: {"python-version": "*", "green-framework": "*", auth-ssl: "*"}
11381138
exclude_spec:
11391139
# Don't test green frameworks on these Python versions.
11401140
- python-version: ["pypy", "pypy3", "jython2.7"]
11411141
green-framework: "*"
11421142
auth-ssl: "*"
1143-
display_name: "${green-framework} ${python-version} Ubuntu 12.04 (x86_64) ${auth-ssl}"
1144-
run_on: ubuntu1204-test
1143+
display_name: "${green-framework} ${python-version} RHEL 6.2 (x86_64) ${auth-ssl}"
1144+
run_on: rhel62-test
11451145
tasks:
11461146
- ".latest"
11471147
- ".3.4"
@@ -1175,11 +1175,11 @@ buildvariants:
11751175
- ".3.0"
11761176
- ".2.6"
11771177

1178-
# Storage engine tests on Ubuntu 12.04 (x86_64) with Python 2.7.
1178+
# Storage engine tests on RHEL 6.2 (x86_64) with Python 2.7.
11791179
- matrix_name: "tests-storage-engines"
11801180
matrix_spec: {storage-engine: "*", python-version: "2.7"}
1181-
display_name: "Storage ${storage-engine} ${python-version} Ubuntu 12.04 (x86_64)"
1182-
run_on: ubuntu1204-test
1181+
display_name: "Storage ${storage-engine} ${python-version} RHEL 6.2 (x86_64)"
1182+
run_on: rhel62-test
11831183
rules:
11841184
- if:
11851185
storage-engine: ["mmapv1", "inmemory"]
@@ -1220,25 +1220,26 @@ buildvariants:
12201220
- matrix_name: "tests-mod-wsgi"
12211221
matrix_spec: {"python-version": ["2.6", "2.7", "3.4", "3.6"], "mod-wsgi-version": "*"}
12221222
exclude_spec:
1223-
python-version: ["3.4", "3.6"]
1223+
# mod_wsgi 2.8 segfaults with the toolchain python 2.7, regardless of distro
1224+
python-version: ["2.7", "3.4", "3.6"]
12241225
mod-wsgi-version: ["2.8"]
12251226
display_name: "${mod-wsgi-version} ${python-version}"
1226-
run_on: ubuntu1204-test
1227+
run_on: rhel62-test
12271228
tasks:
12281229
- name: "mod-wsgi-standalone"
12291230
- name: "mod-wsgi-replica-set"
12301231

12311232
- matrix_name: "mockupdb-tests"
12321233
matrix_spec: {python-version: "2.7"}
12331234
display_name: "MockupDB Tests"
1234-
run_on: ubuntu1204-test
1235+
run_on: rhel62-test
12351236
tasks:
12361237
- name: "mockupdb"
12371238

12381239
- matrix_name: "tests-doctests"
12391240
matrix_spec: {python-version: ["2.7", "3.4"]}
12401241
display_name: "Doctests ${python-version}"
1241-
run_on: ubuntu1204-test
1242+
run_on: rhel62-test
12421243
tasks:
12431244
- name: "doctests"
12441245

@@ -1247,14 +1248,14 @@ buildvariants:
12471248
display_name: "cdecimal ${python-version}"
12481249
batchtime: 10080 # 7 days
12491250
run_on:
1250-
- ubuntu1204-test
1251+
- rhel62-test
12511252
tasks:
12521253
- name: "cdecimal"
12531254

12541255
- name: "no-server"
12551256
display_name: "No server test"
12561257
run_on:
1257-
- ubuntu1204-test
1258+
- rhel62-test
12581259
tasks:
12591260
- name: "no-server"
12601261

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

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,27 @@ set -o xtrace
33
set -o errexit
44

55
APACHE=$(command -v apache2 || command -v /usr/lib/apache2/mpm-prefork/apache2) || true
6-
if [ -z "$APACHE" ]; then
7-
echo "Could not find apache2 binary"
8-
exit 1
6+
if [ -n "$APACHE" ]; then
7+
APACHE_CONFIG=apache22ubuntu1204.conf
8+
else
9+
APACHE=$(command -v httpd) || true
10+
if [ -z "$APACHE" ]; then
11+
echo "Could not find apache2 binary"
12+
exit 1
13+
else
14+
APACHE_CONFIG=apache22amazon.conf
15+
fi
916
fi
1017

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

13-
if [ $MOD_WSGI_VERSION = "2.8" ] && [ $PYTHON_VERSION = "2.7" ]; then
14-
# mod_wsgi 2.8 segfaults when built against the toolchain Python 2.7. Build
15-
# against the system Python 2.7 instead.
16-
git clone https://github.com/GrahamDumpleton/mod_wsgi.git
17-
cd mod_wsgi
18-
git checkout tags/2.8
19-
./configure
20-
make
21-
export MOD_WSGI_SO=$(pwd)/.libs/mod_wsgi.so
22-
cd ..
23-
else
24-
export MOD_WSGI_SO=/opt/python/mod_wsgi/python_version/$PYTHON_VERSION/mod_wsgi_version/$MOD_WSGI_VERSION/mod_wsgi.so
25-
export PYTHONHOME=/opt/python/$PYTHON_VERSION
26-
fi
21+
export MOD_WSGI_SO=/opt/python/mod_wsgi/python_version/$PYTHON_VERSION/mod_wsgi_version/$MOD_WSGI_VERSION/mod_wsgi.so
22+
export PYTHONHOME=/opt/python/$PYTHON_VERSION
2723

2824
cd ..
29-
$APACHE -k start -f ${PROJECT_DIRECTORY}/test/mod_wsgi_test/apache22ubuntu1204.conf
30-
trap "$APACHE -k stop -f ${PROJECT_DIRECTORY}/test/mod_wsgi_test/apache22ubuntu1204.conf" EXIT HUP
25+
$APACHE -k start -f ${PROJECT_DIRECTORY}/test/mod_wsgi_test/${APACHE_CONFIG}
26+
trap "$APACHE -k stop -f ${PROJECT_DIRECTORY}/test/mod_wsgi_test/${APACHE_CONFIG}" EXIT HUP
3127

3228
set +e
3329
wget -t 1 -T 10 -O - "http://localhost:8080${PROJECT_DIRECTORY}"

.evergreen/run-tests.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ else
4141
fi
4242

4343
PYTHON_IMPL=$($PYTHON -c "import platform, sys; sys.stdout.write(platform.python_implementation())")
44+
if [ $PYTHON_IMPL = "Jython" ]; then
45+
EXTRA_ARGS="-J-XX:-UseGCOverheadLimit -J-Xmx4096m"
46+
else
47+
EXTRA_ARGS=""
48+
fi
4449

4550
# Don't download unittest-xml-reporting from pypi, which often fails.
4651
HAVE_XMLRUNNER=$($PYTHON -c "import pkgutil, sys; sys.stdout.write('1' if pkgutil.find_loader('xmlrunner') else '0')")
@@ -84,7 +89,7 @@ if [ -z "$GREEN_FRAMEWORK" ]; then
8489
# causing this script to exit.
8590
$PYTHON -c "from bson import _cbson; from pymongo import _cmessage"
8691
fi
87-
$COVERAGE_OR_PYTHON $COVERAGE_ARGS setup.py $C_EXTENSIONS test $OUTPUT
92+
$COVERAGE_OR_PYTHON $EXTRA_ARGS $COVERAGE_ARGS setup.py $C_EXTENSIONS test $OUTPUT
8893
else
8994
# --no_ext has to come before "test" so there is no way to toggle extensions here.
9095
$PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT

test/mod_wsgi_test/apache22amazon.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
DocumentRoot ${PWD}
66
PidFile ${PWD}/apache2.pid
77

8+
User nobody
9+
Group nobody
10+
811
# Bind to localhost only, don't require sudo.
912
Listen 127.0.0.1:8080
1013

0 commit comments

Comments
 (0)