PYTHON-1390 - Switch CI OS to RHEL 6.2

This commit is contained in:
Bernie Hackett 2017-10-05 17:05:54 -07:00
parent 2847ef89f1
commit 1596c5d94d
4 changed files with 43 additions and 38 deletions

View File

@ -1089,7 +1089,7 @@ buildvariants:
- ".latest"
- ".3.4"
- matrix_name: "tests-python-version-ubuntu1204-test-ssl"
- matrix_name: "tests-python-version-rhel62-test-ssl"
matrix_spec: {"python-version": "*", auth: "*", ssl: "*", coverage: "*"}
exclude_spec:
- python-version: "*"
@ -1106,8 +1106,8 @@ buildvariants:
auth: "*"
ssl: "ssl"
coverage: "*"
display_name: "${python-version} Ubuntu 12.04 (x86_64) ${auth} ${ssl} ${coverage}"
run_on: ubuntu1204-test
display_name: "${python-version} RHEL 6.2 (x86_64) ${auth} ${ssl} ${coverage}"
run_on: rhel62-test
tasks:
- ".latest"
- ".3.4"
@ -1115,7 +1115,7 @@ buildvariants:
- ".3.0"
- ".2.6"
- matrix_name: "tests-python-version-ubuntu1204-without-c-extensions"
- matrix_name: "tests-python-version-rhel62-without-c-extensions"
matrix_spec: {"python-version": "*", "c-extensions": "without-c-extensions", auth: "noauth", ssl: "nossl", coverage: "*"}
exclude_spec:
# These interpreters are always tested without extensions.
@ -1124,8 +1124,8 @@ buildvariants:
auth: "*"
ssl: "*"
coverage: "*"
display_name: "${c-extensions} ${python-version} Ubuntu 12.04 (x86_64) ${auth} ${ssl} ${coverage}"
run_on: ubuntu1204-test
display_name: "${c-extensions} ${python-version} RHEL 6.2 (x86_64) ${auth} ${ssl} ${coverage}"
run_on: rhel62-test
tasks:
- ".latest"
- ".3.4"
@ -1133,15 +1133,15 @@ buildvariants:
- ".3.0"
- ".2.6"
- matrix_name: "tests-python-version-green-framework-ubuntu1204"
- matrix_name: "tests-python-version-green-framework-rhel62"
matrix_spec: {"python-version": "*", "green-framework": "*", auth-ssl: "*"}
exclude_spec:
# Don't test green frameworks on these Python versions.
- python-version: ["pypy", "pypy3", "jython2.7"]
green-framework: "*"
auth-ssl: "*"
display_name: "${green-framework} ${python-version} Ubuntu 12.04 (x86_64) ${auth-ssl}"
run_on: ubuntu1204-test
display_name: "${green-framework} ${python-version} RHEL 6.2 (x86_64) ${auth-ssl}"
run_on: rhel62-test
tasks:
- ".latest"
- ".3.4"
@ -1175,11 +1175,11 @@ buildvariants:
- ".3.0"
- ".2.6"
# Storage engine tests on Ubuntu 12.04 (x86_64) with Python 2.7.
# Storage engine tests on RHEL 6.2 (x86_64) with Python 2.7.
- matrix_name: "tests-storage-engines"
matrix_spec: {storage-engine: "*", python-version: "2.7"}
display_name: "Storage ${storage-engine} ${python-version} Ubuntu 12.04 (x86_64)"
run_on: ubuntu1204-test
display_name: "Storage ${storage-engine} ${python-version} RHEL 6.2 (x86_64)"
run_on: rhel62-test
rules:
- if:
storage-engine: ["mmapv1", "inmemory"]
@ -1220,10 +1220,11 @@ buildvariants:
- matrix_name: "tests-mod-wsgi"
matrix_spec: {"python-version": ["2.6", "2.7", "3.4", "3.6"], "mod-wsgi-version": "*"}
exclude_spec:
python-version: ["3.4", "3.6"]
# mod_wsgi 2.8 segfaults with the toolchain python 2.7, regardless of distro
python-version: ["2.7", "3.4", "3.6"]
mod-wsgi-version: ["2.8"]
display_name: "${mod-wsgi-version} ${python-version}"
run_on: ubuntu1204-test
run_on: rhel62-test
tasks:
- name: "mod-wsgi-standalone"
- name: "mod-wsgi-replica-set"
@ -1231,14 +1232,14 @@ buildvariants:
- matrix_name: "mockupdb-tests"
matrix_spec: {python-version: "2.7"}
display_name: "MockupDB Tests"
run_on: ubuntu1204-test
run_on: rhel62-test
tasks:
- name: "mockupdb"
- matrix_name: "tests-doctests"
matrix_spec: {python-version: ["2.7", "3.4"]}
display_name: "Doctests ${python-version}"
run_on: ubuntu1204-test
run_on: rhel62-test
tasks:
- name: "doctests"
@ -1247,14 +1248,14 @@ buildvariants:
display_name: "cdecimal ${python-version}"
batchtime: 10080 # 7 days
run_on:
- ubuntu1204-test
- rhel62-test
tasks:
- name: "cdecimal"
- name: "no-server"
display_name: "No server test"
run_on:
- ubuntu1204-test
- rhel62-test
tasks:
- name: "no-server"

View File

@ -3,31 +3,27 @@ set -o xtrace
set -o errexit
APACHE=$(command -v apache2 || command -v /usr/lib/apache2/mpm-prefork/apache2) || true
if [ -z "$APACHE" ]; then
echo "Could not find apache2 binary"
exit 1
if [ -n "$APACHE" ]; then
APACHE_CONFIG=apache22ubuntu1204.conf
else
APACHE=$(command -v httpd) || true
if [ -z "$APACHE" ]; then
echo "Could not find apache2 binary"
exit 1
else
APACHE_CONFIG=apache22amazon.conf
fi
fi
PYTHON_VERSION=$(${PYTHON_BINARY} -c "import sys; sys.stdout.write('.'.join(str(val) for val in sys.version_info[:2]))")
if [ $MOD_WSGI_VERSION = "2.8" ] && [ $PYTHON_VERSION = "2.7" ]; then
# mod_wsgi 2.8 segfaults when built against the toolchain Python 2.7. Build
# against the system Python 2.7 instead.
git clone https://github.com/GrahamDumpleton/mod_wsgi.git
cd mod_wsgi
git checkout tags/2.8
./configure
make
export MOD_WSGI_SO=$(pwd)/.libs/mod_wsgi.so
cd ..
else
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
fi
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
cd ..
$APACHE -k start -f ${PROJECT_DIRECTORY}/test/mod_wsgi_test/apache22ubuntu1204.conf
trap "$APACHE -k stop -f ${PROJECT_DIRECTORY}/test/mod_wsgi_test/apache22ubuntu1204.conf" EXIT HUP
$APACHE -k start -f ${PROJECT_DIRECTORY}/test/mod_wsgi_test/${APACHE_CONFIG}
trap "$APACHE -k stop -f ${PROJECT_DIRECTORY}/test/mod_wsgi_test/${APACHE_CONFIG}" EXIT HUP
set +e
wget -t 1 -T 10 -O - "http://localhost:8080${PROJECT_DIRECTORY}"

View File

@ -41,6 +41,11 @@ else
fi
PYTHON_IMPL=$($PYTHON -c "import platform, sys; sys.stdout.write(platform.python_implementation())")
if [ $PYTHON_IMPL = "Jython" ]; then
EXTRA_ARGS="-J-XX:-UseGCOverheadLimit -J-Xmx4096m"
else
EXTRA_ARGS=""
fi
# Don't download unittest-xml-reporting from pypi, which often fails.
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
# causing this script to exit.
$PYTHON -c "from bson import _cbson; from pymongo import _cmessage"
fi
$COVERAGE_OR_PYTHON $COVERAGE_ARGS setup.py $C_EXTENSIONS test $OUTPUT
$COVERAGE_OR_PYTHON $EXTRA_ARGS $COVERAGE_ARGS setup.py $C_EXTENSIONS test $OUTPUT
else
# --no_ext has to come before "test" so there is no way to toggle extensions here.
$PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT

View File

@ -5,6 +5,9 @@
DocumentRoot ${PWD}
PidFile ${PWD}/apache2.pid
User nobody
Group nobody
# Bind to localhost only, don't require sudo.
Listen 127.0.0.1:8080