Skip to content

Commit 6eedd69

Browse files
committed
CSHARP-3008: Split tests into .NET Framework/.Net Core variants
1 parent 010e7ee commit 6eedd69

File tree

2 files changed

+47
-7
lines changed

2 files changed

+47
-7
lines changed

evergreen/evergreen.yml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ command_type: system
1414

1515
# Protect ourself against rogue test case, or curl gone wild, that runs forever
1616
# 12 minutes is the longest we'll ever run
17-
exec_timeout_secs: 3600 # 12 minutes is the longest we'll ever run
17+
exec_timeout_secs: 1800
1818

1919
# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
2020
timeout:
@@ -247,6 +247,7 @@ functions:
247247
OS=${OS} \
248248
COMPRESSOR=${COMPRESSOR} \
249249
CLIENT_PEM=${DRIVERS_TOOLS}/.evergreen/x509gen/client.pem \
250+
FRAMEWORK=${FRAMEWORK} \
250251
evergreen/run-tests.sh
251252
echo "Skipping certificate removal..."
252253
@@ -607,6 +608,27 @@ tasks:
607608
- func: bootstrap-mongo-orchestration
608609
- func: run-tests
609610

611+
- name: test-net452
612+
commands:
613+
- func: bootstrap-mongo-orchestration
614+
- func: run-tests
615+
vars:
616+
FRAMEWORK: net452
617+
618+
- name: test-netstandard15
619+
commands:
620+
- func: bootstrap-mongo-orchestration
621+
- func: run-tests
622+
vars:
623+
FRAMEWORK: netstandard15
624+
625+
- name: test-netstandard20
626+
commands:
627+
- func: bootstrap-mongo-orchestration
628+
- func: run-tests
629+
vars:
630+
FRAMEWORK: netstandard20
631+
610632
- name: atlas-connectivity-tests
611633
commands:
612634
- func: run-atlas-connectivity-tests
@@ -1083,35 +1105,45 @@ buildvariants:
10831105
display_name: "${version} ${topology} ${auth} ${ssl} ${os}"
10841106
tags: ["tests-variant"]
10851107
tasks:
1086-
- name: test
1108+
- name: test-net452
1109+
- name: test-netstandard15
1110+
- name: test-netstandard20
10871111

10881112
- matrix_name: "unsecure-tests"
10891113
matrix_spec: { version: "*", topology: "*", auth: "noauth", ssl: "nossl", os: "*" }
10901114
display_name: "${version} ${topology} ${auth} ${ssl} ${os}"
10911115
tags: ["tests-variant"]
10921116
tasks:
1093-
- name: test
1117+
- name: test-net452
1118+
- name: test-netstandard15
1119+
- name: test-netstandard20
10941120

10951121
- matrix_name: "tests-zlib-compression"
10961122
matrix_spec: { compressor : "zlib", auth: "noauth", ssl: "nossl", version: ["3.6", "4.0", "4.2", "4.4", "latest"], topology: "standalone", os: "*" }
10971123
display_name: "${version} ${compressor} ${topology} ${auth} ${ssl} ${os} "
10981124
tags: ["tests-variant"]
10991125
tasks:
1100-
- name: "test"
1126+
- name: test-net452
1127+
- name: test-netstandard15
1128+
- name: test-netstandard20
11011129

11021130
- matrix_name: "tests-snappy-compression"
11031131
matrix_spec: { compressor : "snappy", auth: "noauth", ssl: "nossl", version: ["3.6", "4.0", "4.2", "4.4", "latest"], topology: "standalone", os: "*" }
11041132
display_name: "${version} ${compressor} ${topology} ${auth} ${ssl} ${os} "
11051133
tags: ["tests-variant"]
11061134
tasks:
1107-
- name: "test"
1135+
- name: test-net452
1136+
- name: test-netstandard15
1137+
- name: test-netstandard20
11081138

11091139
- matrix_name: "tests-zstandard-compression"
11101140
matrix_spec: { compressor : "zstandard", auth: "noauth", ssl: "nossl", version: ["3.6", "4.0", "4.2", "4.4", "latest"], topology: "standalone", os: "*" }
11111141
display_name: "${version} ${compressor} ${topology} ${auth} ${ssl} ${os} "
11121142
tags: ["tests-variant"]
11131143
tasks:
1114-
- name: "test"
1144+
- name: test-net452
1145+
- name: test-netstandard15
1146+
- name: test-netstandard20
11151147

11161148
- matrix_name: "ocsp-tests"
11171149
matrix_spec: { version: ["4.4", "latest"], auth: "noauth", ssl: "ssl", topology: "standalone", os: "*" } # matrix_spec: { version: ["latest"], os-ssl-32: ["ubuntu1604-64-go-1-12"] }

evergreen/run-tests.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ set -o errexit # Exit the script with error if any of the commands fail
99
# MONGODB_URI Set the suggested connection MONGODB_URI (including credentials and topology info)
1010
# TOPOLOGY Allows you to modify variables and the MONGODB_URI based on test topology
1111
# Supported values: "server", "replica_set", "sharded_cluster"
12+
# CLIENT_PEM Path to mongo-orchestration's client.pem
1213
# OCSP_TLS_SHOULD_SUCCEED Set to test OCSP. Values are true/false/nil
1314
# MONGODB_X509_CLIENT_P12_PATH Absolute path to client certificate in p12 format
1415
# MONGO_X509_CLIENT_CERTIFICATE_PASSWORD password for client certificate
16+
# FRAMEWORK Set to specify .NET framework to test against. Values: "Net452", "NetStandard15",
17+
# "NetStandard20", "nil"
1518
#
1619
# Environment variables produced as output:
1720
# MONGODB_X509_CLIENT_P12_PATH Absolute path to client certificate in p12 format
@@ -24,6 +27,7 @@ TOPOLOGY=${TOPOLOGY:-server}
2427
COMPRESSOR=${COMPRESSOR:-none}
2528
OCSP_TLS_SHOULD_SUCCEED=${OCSP_TLS_SHOULD_SUCCEED:-nil}
2629
CLIENT_PEM=${CLIENT_PEM:-nil}
30+
PLATFORM=${PLATFORM:-nil}
2731

2832
############################################
2933
# Functions #
@@ -88,7 +92,11 @@ fi
8892
echo "Running $AUTH tests over $SSL for $TOPOLOGY with $COMPRESSOR compressor and connecting to $MONGODB_URI"
8993

9094
if [[ "$OS" =~ Windows|windows ]]; then
91-
export TARGET="Test"
95+
if [[ "$FRAMEWORK" == "nil" ]]; then
96+
export TARGET="Test"
97+
else
98+
export TARGET="Test${FRAMEWORK}"
99+
fi
92100
if [ "$OCSP_TLS_SHOULD_SUCCEED" != "nil" ]; then
93101
export TARGET="TestOcsp"
94102
certutil.exe -urlcache localhost delete # clear the OS-level cache of all entries with the URL "localhost"

0 commit comments

Comments
 (0)