Skip to content

Commit c4091d8

Browse files
committed
PYTHON-1239 - Test explicitly without C extensions
1 parent a87b390 commit c4091d8

File tree

2 files changed

+40
-2
lines changed

2 files changed

+40
-2
lines changed

.evergreen/config.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ functions:
334334
working_dir: "src"
335335
script: |
336336
${PREPARE_SHELL}
337-
PYTHON_BINARY=${PYTHON_BINARY} AUTH=${AUTH} SSL=${SSL} MONGODB_URI="${MONGODB_URI}" sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
337+
PYTHON_BINARY=${PYTHON_BINARY} C_EXTENSIONS=${C_EXTENSIONS} AUTH=${AUTH} SSL=${SSL} MONGODB_URI="${MONGODB_URI}" sh ${PROJECT_DIRECTORY}/.evergreen/run-tests.sh
338338
339339
"cleanup":
340340
- command: shell.exec
@@ -822,6 +822,13 @@ axes:
822822
display_name: "Jython 2.7"
823823
variables:
824824
PYTHON_BINARY: "/opt/python/jython2.7/bin/jython"
825+
- id: c-extensions
826+
display_name: "C Extensions"
827+
values:
828+
- id: "without-c-extensions"
829+
display_name: "Without C Extensions"
830+
variables:
831+
C_EXTENSIONS: "--no_ext"
825832
#- id: windows-vs2008-python-version
826833
# display_name: "Windows Visual Studio 2008 Python"
827834
# values:
@@ -1017,6 +1024,36 @@ buildvariants:
10171024
- name: "test-2.4-sharded_cluster"
10181025
- name: "test-2.4-standalone"
10191026

1027+
- matrix_name: "tests-python-version-ubuntu1604-without-c-extensions"
1028+
matrix_spec: {"python-version": "*", "c-extensions": "without-c-extensions", auth: "noauth", ssl: "nossl" }
1029+
exclude_spec:
1030+
# These interpreters are always tested without extensions.
1031+
- python-version: ["pypy", "pypy3", "jython2.5", "jython2.7"]
1032+
c-extensions: "*"
1033+
auth: "*"
1034+
ssl: "*"
1035+
display_name: "${c-extensions} ${python-version} Ubuntu 16.04 (x86_64) ${auth} ${ssl}"
1036+
run_on: ubuntu1604-test
1037+
tasks:
1038+
- name: "test-latest-replica_set"
1039+
- name: "test-latest-sharded_cluster"
1040+
- name: "test-latest-standalone"
1041+
- name: "test-3.4-replica_set"
1042+
- name: "test-3.4-sharded_cluster"
1043+
- name: "test-3.4-standalone"
1044+
- name: "test-3.2-replica_set"
1045+
- name: "test-3.2-sharded_cluster"
1046+
- name: "test-3.2-standalone"
1047+
- name: "test-3.0-replica_set"
1048+
- name: "test-3.0-sharded_cluster"
1049+
- name: "test-3.0-standalone"
1050+
- name: "test-2.6-replica_set"
1051+
- name: "test-2.6-sharded_cluster"
1052+
- name: "test-2.6-standalone"
1053+
- name: "test-2.4-replica_set"
1054+
- name: "test-2.4-sharded_cluster"
1055+
- name: "test-2.4-standalone"
1056+
10201057
# TODO: Figure out SSL on Windows.
10211058

10221059
# Test Python 2.6, 2.7, and 3.2 against all versions on MongoDB >= 2.4

.evergreen/run-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ AUTH=${AUTH:-noauth}
1313
SSL=${SSL:-nossl}
1414
MONGODB_URI=${MONGODB_URI:-}
1515
PYTHON_BINARY=${PYTHON_BINARY:-}
16+
C_EXTENSIONS=${C_EXTENSIONS:-}
1617

1718

1819
if [ "$AUTH" != "noauth" ]; then
@@ -74,4 +75,4 @@ $PYTHON -c 'import sys; print(sys.version)'
7475
# files in the xunit-results/ directory.
7576

7677
$PYTHON setup.py clean
77-
$PYTHON $EXTRA_ARGS setup.py $TEST_CMD $TEST_VERBOSITY
78+
$PYTHON $EXTRA_ARGS setup.py $C_EXTENSIONS $TEST_CMD $TEST_VERBOSITY

0 commit comments

Comments
 (0)