Skip to content

Commit 5b561f5

Browse files
committed
convert standard tests
1 parent ef171ab commit 5b561f5

File tree

5 files changed

+63
-32
lines changed

5 files changed

+63
-32
lines changed

.evergreen/build-nextest-archive.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ source .evergreen/features.sh
88

99
FEATURE_FLAGS+=("${STANDARD_FEATURES[@]}")
1010

11+
add_conditional_features
12+
1113
cargo nextest archive --workspace $(features_option) --archive-file nextest-archive.tar.zst

.evergreen/cargo-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CARGO_RESULT=0
77
. .evergreen/features.sh
88

99
cargo_test_options() {
10-
echo $1 ${CARGO_OPTIONS[@]} ${features_option} -- ${TEST_OPTIONS[@]}
10+
echo $1 ${CARGO_OPTIONS[@]} $(features_option) -- ${TEST_OPTIONS[@]}
1111
}
1212

1313
cargo_test() {

.evergreen/config.yml

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,22 @@ buildvariants:
5454
- name: compile
5555
display_name: "Compile Only"
5656
run_on:
57-
- rhel87-small
57+
- rhel8-latest-small
5858
tasks:
5959
- name: compile-on-latest
6060
- name: compile-on-msrv
6161

6262
- name: lint
6363
display_name: "Lint"
6464
run_on:
65-
- rhel87-small
65+
- rhel8-latest-small
6666
tasks:
6767
- name: .lint
6868

6969
- name: cargo-deny
7070
display_name: "Cargo Deny"
7171
run_on:
72-
- rhel87-small
72+
- rhel8-latest-small
7373
tasks:
7474
- name: check-cargo-deny
7575

@@ -94,7 +94,9 @@ buildvariants:
9494
expansions:
9595
AUTH: auth
9696
SSL: ssl
97+
USE_NEXTEST_ARCHIVE: true
9798
tasks:
99+
- name: build-nextest-archive
98100
# Ubuntu 22.04 does not support MongoDB versions below 6.0.
99101
- name: .standalone !.4.2 !.4.4 !.5.0
100102
- name: .replicaset !.4.2 !.4.4 !.5.0
@@ -107,7 +109,9 @@ buildvariants:
107109
expansions:
108110
AUTH: auth
109111
SSL: ssl
112+
USE_NEXTEST_ARCHIVE: true
110113
tasks:
114+
- name: build-nextest-archive
111115
- name: .standalone
112116
- name: .replicaset
113117
- name: .sharded
@@ -119,20 +123,24 @@ buildvariants:
119123
expansions:
120124
AUTH: auth
121125
SSL: ssl
126+
USE_NEXTEST_ARCHIVE: true
122127
tasks:
128+
- name: build-nextest-archive
123129
- name: .standalone
124130
- name: .replicaset
125131
- name: .sharded
126132

127133
- name: openssl-rhel
128134
display_name: "OpenSSL (RHEL)"
129135
run_on:
130-
- rhel87-small
136+
- rhel8-latest-small
131137
expansions:
132138
OPENSSL: true
133139
AUTH: auth
134140
SSL: ssl
141+
USE_NEXTEST_ARCHIVE: true
135142
tasks:
143+
- name: build-nextest-archive
136144
- name: .rapid .replicaset
137145

138146
- name: openssl-ubuntu
@@ -144,7 +152,9 @@ buildvariants:
144152
OPENSSL: true
145153
AUTH: auth
146154
SSL: ssl
155+
USE_NEXTEST_ARCHIVE: true
147156
tasks:
157+
- name: build-nextest-archive
148158
- name: .rapid .replicaset
149159

150160
- name: openssl-macos
@@ -156,7 +166,9 @@ buildvariants:
156166
OPENSSL: true
157167
AUTH: auth
158168
SSL: ssl
169+
USE_NEXTEST_ARCHIVE: true
159170
tasks:
171+
- name: build-nextest-archive
160172
- name: .rapid .replicaset
161173

162174
- name: openssl-windows
@@ -168,21 +180,26 @@ buildvariants:
168180
OPENSSL: true
169181
AUTH: auth
170182
SSL: ssl
183+
USE_NEXTEST_ARCHIVE: true
171184
tasks:
185+
- name: build-nextest-archive
172186
- name: .rapid .replicaset
173187

174188
- name: no-auth-tls
175189
display_name: "No Auth/TLS"
176190
run_on:
177-
- rhel87-small
191+
- rhel8-latest-small
192+
expansions:
193+
USE_NEXTEST_ARCHIVE: true
178194
tasks:
195+
- name: build-nextest-archive
179196
- .rapid .replicaset
180197

181198
- name: compression
182199
display_name: "Compression"
183200
patchable: false
184201
run_on:
185-
- rhel87-small
202+
- rhel8-latest-small
186203
expansions:
187204
AUTH: auth
188205
SSL: ssl
@@ -193,13 +210,15 @@ buildvariants:
193210
display_name: "Stable API V1"
194211
patchable: false
195212
run_on:
196-
- rhel87-small
213+
- rhel8-latest-small
197214
expansions:
198215
REQUIRE_API_VERSION: true
199216
MONGODB_API_VERSION: 1
200217
AUTH: auth
218+
USE_NEXTEST_ARCHIVE: true
201219
# Configuring SSL: ssl causes errors in bootstrap mongo-orchestration.
202220
tasks:
221+
- name: build-nextest-archive
203222
# The Stable API was introduced in MongoDB version 5.0. Drivers Evergreen Tools only supports
204223
# setting REQUIRE_API_VERSION on standalones and sharded clusters.
205224
- .standalone !.4.2 !.4.4
@@ -208,7 +227,7 @@ buildvariants:
208227
- name: sync-api
209228
display_name: "Sync API"
210229
run_on:
211-
- rhel87-small
230+
- rhel8-latest-small
212231
expansions:
213232
AUTH: auth
214233
SSL: ssl
@@ -219,7 +238,7 @@ buildvariants:
219238
display_name: "Atlas Connectivity"
220239
patchable: false
221240
run_on:
222-
- rhel87-small
241+
- rhel8-latest-small
223242
tasks:
224243
- test-atlas-connectivity
225244

@@ -263,7 +282,7 @@ buildvariants:
263282
display_name: "GSSAPI Authentication - Linux"
264283
patchable: true
265284
run_on:
266-
- rhel87-small
285+
- rhel8-latest-small
267286
tasks:
268287
- test-gssapi-auth
269288

@@ -288,7 +307,7 @@ buildvariants:
288307
display_name: "x509 Authentication"
289308
patchable: false
290309
run_on:
291-
- rhel87-small
310+
- rhel8-latest-small
292311
expansions:
293312
AUTH: auth
294313
SSL: ssl
@@ -373,15 +392,15 @@ buildvariants:
373392
- name: load-balancer
374393
display_name: "Load Balancer"
375394
run_on:
376-
- rhel87-small
395+
- rhel8-latest-small
377396
tasks:
378397
- .load-balancer
379398

380399
- name: search-index
381400
display_name: "Search Index Helpers"
382401
patchable: false
383402
run_on:
384-
- rhel87-small
403+
- rhel8-latest-small
385404
tasks:
386405
- name: search-index-task-group
387406

@@ -1250,8 +1269,6 @@ tasks:
12501269

12511270
- name: build-nextest-archive
12521271
commands:
1253-
- func: "install libmongocrypt"
1254-
type: setup
12551272
- command: subprocess.exec
12561273
type: setup
12571274
params:
@@ -1261,6 +1278,10 @@ tasks:
12611278
- .evergreen/build-nextest-archive.sh
12621279
include_expansions_in_env:
12631280
- PROJECT_DIRECTORY
1281+
- OPENSSL
1282+
- ZSTD
1283+
- ZLIB
1284+
- SNAPPY
12641285
- command: s3.put
12651286
type: setup
12661287
params:

.evergreen/features.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,22 @@ features_option() {
1818
if ((${#FILTERED[@]} != 0)); then
1919
echo "--features $(_join_by , "${FILTERED[@]}")"
2020
fi
21+
}
22+
23+
add_conditional_features() {
24+
if [ "$OPENSSL" = true ]; then
25+
FEATURE_FLAGS+=("openssl-tls")
26+
fi
27+
28+
if [ "$ZSTD" = true ]; then
29+
FEATURE_FLAGS+=("zstd-compression")
30+
fi
31+
32+
if [ "$ZLIB" = true ]; then
33+
FEATURE_FLAGS+=("zlib-compression")
34+
fi
35+
36+
if [ "$SNAPPY" = true ]; then
37+
FEATURE_FLAGS+=("snappy-compression")
38+
fi
2139
}

.evergreen/run-tests.sh

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,16 @@ source .evergreen/cargo-test.sh
88

99
FEATURE_FLAGS+=("${STANDARD_FEATURES[@]}")
1010

11-
if [ "$OPENSSL" = true ]; then
12-
FEATURE_FLAGS+=("openssl-tls")
13-
fi
14-
15-
if [ "$ZSTD" = true ]; then
16-
FEATURE_FLAGS+=("zstd-compression")
17-
fi
18-
19-
if [ "$ZLIB" = true ]; then
20-
FEATURE_FLAGS+=("zlib-compression")
21-
fi
22-
23-
if [ "$SNAPPY" = true ]; then
24-
FEATURE_FLAGS+=("snappy-compression")
25-
fi
11+
add_conditional_features
2612

2713
if [ "$USE_NEXTEST_ARCHIVE" = true ]; then
2814
# Feature flags are set when the archive is built
15+
WORKSPACE_ROOT="$(pwd)"
16+
if [ "Windows_NT" == "$OS" ]; then
17+
WORKSPACE_ROOT="$(cygpath -w ${WORKSPACE_ROOT})"
18+
fi
2919
FEATURE_FLAGS=()
30-
CARGO_OPTIONS+=("--archive-file" "nextest-archive.tar.zst" "--workspace-remap" "$(pwd)")
20+
CARGO_OPTIONS+=("--archive-file" "nextest-archive.tar.zst" "--workspace-remap" "${WORKSPACE_ROOT}")
3121
fi
3222

3323
echo "cargo test options: $(cargo_test_options)"

0 commit comments

Comments
 (0)