Skip to content

Commit a15e4a4

Browse files
committed
WIP: refactor e2e tests for foliage
1 parent 90581ae commit a15e4a4

File tree

1 file changed

+54
-8
lines changed

1 file changed

+54
-8
lines changed

.evergreen/evergreen.yml.in

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ const platformDetails = platformToDetails[platform];
6262
// Unit tests on macOS use arm64 and therefore require 6.0+
6363
continue;
6464
}
65+
const platformDetails = platformToDetails[platform];
6566
ALL_UNIT_TEST_BUILD_VARIANTS.push({
6667
...platformDetails,
6768
name: `tests_${platform}-m${mShort}_n${nShort}`,
@@ -76,6 +77,20 @@ const platformDetails = platformToDetails[platform];
7677
}
7778
}
7879

80+
const { RELEASE_PACKAGE_MATRIX } = require('../config/release-package-matrix');
81+
82+
const ALL_E2E_TEST_BUILD_VARIANTS = [];
83+
for (const { executableOsId, compileBuildVariant, description } of RELEASE_PACKAGE_MATRIX) {
84+
for (const mVersion of ['stable', '7.0.x', '6.0.x']) {
85+
for (const fipsVariant of ['fips', 'nofips']) {
86+
ALL_E2E_TEST_BUILD_VARIANTS.push({
87+
displayName: `${description} ${executableOsId.replace(/-/g, '_')}${(mVersion === 'stable' ? '' : '_' + mVersion.replace(/[^a-zA-Z0-9]/g, ''))}${(fipsVariant === 'fips' ? '_fips' : '')}`,
88+
name: `e2e_tests_${executableOsId.replace(/-/g, '_')}${(mVersion === 'stable' ? '' : '_' + mVersion.replace(/[^a-zA-Z0-9]/g, ''))}${(fipsVariant === 'fips' ? '_fips' : '')}`,
89+
executableOsId, compileBuildVariant, mVersion, fipsVariant });
90+
}
91+
}
92+
}
93+
7994
for (const packageInfo of MONGOSH_PACKAGES) {
8095
const id = `${packageInfo.name.replace(/-/g, '_')}`;
8196

@@ -89,7 +104,6 @@ for (const packageInfo of MONGOSH_PACKAGES) {
89104
}
90105

91106

92-
const { RELEASE_PACKAGE_MATRIX } = require('../config/release-package-matrix');
93107

94108
%>
95109
exec_timeout_secs: 10800
@@ -1249,7 +1263,26 @@ tasks:
12491263
###
12501264
# E2E TESTS
12511265
###
1252-
<% for (const { executableOsId, compileBuildVariant } of RELEASE_PACKAGE_MATRIX) {
1266+
1267+
- name: e2e_tests
1268+
tags: ["e2e-test"]
1269+
depends_on:
1270+
- name: compile_artifact
1271+
commands:
1272+
- func: checkout
1273+
- func: install
1274+
vars:
1275+
node_js_version: ${node_js_version}
1276+
- func: download_compiled_artifact
1277+
vars:
1278+
executable_os_id: ${executable_os_id}
1279+
- func: run_e2e_tests
1280+
vars:
1281+
node_js_version: ${node_js_version}
1282+
mongosh_server_test_version: ${mongosh_server_test_version}
1283+
mongosh_test_e2e_force_fips: ${mongosh_test_e2e_force_fips}
1284+
disable_openssl_shared_config_for_bundled_openssl: ${disable_openssl_shared_config_for_bundled_openssl|false}
1285+
<% for (const { executableOsId, compileBuildVariant } of RELEASE_PACKAGE_MATRIX) {
12531286
for (const mVersion of ['stable', '7.0.x', '6.0.x']) {
12541287
for (const fipsVariant of ['fips', 'nofips']) {
12551288
%>
@@ -1272,22 +1305,20 @@ tasks:
12721305
mongosh_server_test_version: "<% out(mVersion) %>-enterprise"
12731306
mongosh_test_e2e_force_fips: "<% out(fipsVariant === 'fips' ? '1' : '') %>"
12741307
disable_openssl_shared_config_for_bundled_openssl: ${disable_openssl_shared_config_for_bundled_openssl|false}
1275-
<% } } %>
1276-
- name: perf_tests_<% out(executableOsId.replace(/-/g, '_')) %>
1308+
<% } } } %>
1309+
- name: perf_tests
12771310
tags: ["perf-test"]
12781311
depends_on:
12791312
- name: compile_artifact
1280-
variant: <% out(compileBuildVariant) %>
12811313
commands:
12821314
- func: checkout
12831315
- func: install
12841316
vars:
12851317
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
12861318
- func: download_compiled_artifact
12871319
vars:
1288-
executable_os_id: <% out(executableOsId) %>
1320+
executable_os_id: ${executable_os_id}
12891321
- func: run_perf_tests
1290-
<% } %>
12911322

12921323
###
12931324
# EXECUTABLE CONNECTIVITY TESTS
@@ -1561,6 +1592,19 @@ buildvariants:
15611592
- name: test_<% out(test.id) %>
15621593
<% } %>
15631594
<% } %>
1595+
<% for (const variant of ALL_E2E_TEST_BUILD_VARIANTS) { %>
1596+
- name: <% out(variant.name) %>
1597+
display_name: "<% out(variant.displayName) %><% out(variant.mShort === undefined ? '' : ` m${variant.mShort}`) %> n<% out(variant.nShort) %> (Unit tests)"
1598+
run_on: <% out(variant.runOn) %>
1599+
tags: <% out([...(variant.tags ?? []), ...(variant.mShort === 'latest' ? ["mlatest"] : [])]) %>
1600+
expansions:
1601+
executable_os_id: <% out(variant.executableOsId) %>
1602+
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
1603+
mongosh_server_test_version: "<% out(variant.mVersion) %>-enterprise"
1604+
mongosh_test_e2e_force_fips: "<% out(variant.fipsVariant === 'fips' ? '1' : '') %>"
1605+
tasks:
1606+
- name: e2e_tests
1607+
<% } %>
15641608
- name: darwin
15651609
display_name: "MacOS Big Sur"
15661610
run_on: macos-11
@@ -2070,4 +2114,6 @@ buildvariants:
20702114
display_name: "Performance Tests"
20712115
run_on: rhel90-dbx-perf-large
20722116
tasks:
2073-
- name: perf_tests_linux_x64
2117+
- name: perf_tests
2118+
expansions:
2119+
executable_os_id: linux_x64

0 commit comments

Comments
 (0)