Skip to content

Commit 7bfdc1a

Browse files
committed
rhel-8
1 parent c2c931b commit 7bfdc1a

File tree

10 files changed

+579
-73
lines changed

10 files changed

+579
-73
lines changed

.evergreen/build-nextest-archive.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ set -o errexit
44
set -o pipefail
55

66
source .evergreen/env.sh
7+
source .evergreen/features.sh
78

8-
cargo nextest archive --workspace --all-features --archive-file nextest-archive.tar.zst
9+
FEATURE_FLAGS+=("${STANDARD_FEATURES[@]}")
10+
11+
cargo nextest archive --workspace $(features_option) --archive-file ${ARCHIVE_FILE}

.evergreen/cargo-test.sh

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,12 @@
22

33
CARGO_OPTIONS=()
44
TEST_OPTIONS=()
5-
FEATURE_FLAGS=()
65
CARGO_RESULT=0
76

8-
join_by() {
9-
local IFS="$1"
10-
shift
11-
echo "$*"
12-
}
7+
. .evergreen/features.sh
138

149
cargo_test_options() {
15-
local FILTERED=()
16-
for FEAT in "${FEATURE_FLAGS[@]}"; do
17-
[[ "${FEAT}" != "" ]] && FILTERED+=("${FEAT}")
18-
done
19-
local FEATURE_OPTION=""
20-
if ((${#FILTERED[@]} != 0)); then
21-
FEATURE_OPTION="--features $(join_by , "${FILTERED[@]}")"
22-
fi
23-
echo $1 ${CARGO_OPTIONS[@]} ${FEATURE_OPTION} -- ${TEST_OPTIONS[@]}
10+
echo $1 ${CARGO_OPTIONS[@]} ${features_option} -- ${TEST_OPTIONS[@]}
2411
}
2512

2613
cargo_test() {

.evergreen/config.yml

Lines changed: 10 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ buildvariants:
8080
expansions:
8181
AUTH: auth
8282
SSL: ssl
83+
ARCHIVE_FILE: "nextest-archive.tar.zst"
8384
tasks:
84-
- name: .standalone
85-
- name: .replicaset
86-
- name: .sharded
85+
- name: build-nextest-archive
86+
- name: .standalone .archive
87+
- name: .replicaset .archive
88+
- name: .sharded .archive
8789

8890
- name: ubuntu-22.04-arm64
8991
display_name: "Ubuntu 22.04 (ARM64)"
@@ -419,16 +421,6 @@ buildvariants:
419421
#- name: .8.0
420422
#- name: .7.0
421423

422-
- name: binary-cache-wip
423-
display_name: "Binary Caching WIP"
424-
run_on:
425-
- rhel87-small
426-
expansions:
427-
LIBMONGOCRYPT_OS: rhel-80-64-bit
428-
tasks:
429-
- build-nextest-archive
430-
- run-nextest-archive
431-
432424
###############
433425
# Task Groups #
434426
###############
@@ -1269,53 +1261,18 @@ tasks:
12691261
- .evergreen/build-nextest-archive.sh
12701262
include_expansions_in_env:
12711263
- PROJECT_DIRECTORY
1272-
- MONGOCRYPT_LIB_DIR
1264+
- ARCHIVE_FILE
12731265
- command: s3.put
12741266
type: setup
12751267
params:
12761268
aws_key: ${aws_key}
12771269
aws_secret: ${aws_secret}
1278-
local_file: src/nextest-archive.tar.zst
1279-
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${build_id}-nextest-archive.tar.zst
1270+
local_file: src/${ARCHIVE_FILE}
1271+
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${build_id}-${ARCHIVE_FILE}
12801272
bucket: mciuploads
12811273
permissions: public-read
12821274
content_type: application/zstd
1283-
display_name: nextest-archive.tar.zst
1284-
1285-
- name: run-nextest-archive
1286-
depends_on:
1287-
- name: build-nextest-archive
1288-
commands:
1289-
- command: s3.get
1290-
type: setup
1291-
params:
1292-
aws_key: ${aws_key}
1293-
aws_secret: ${aws_secret}
1294-
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${build_id}-nextest-archive.tar.zst
1295-
bucket: mciuploads
1296-
local_file: src/nextest-archive.tar.zst
1297-
- func: "install libmongocrypt"
1298-
type: setup
1299-
- func: "bootstrap mongo-orchestration"
1300-
type: setup
1301-
vars:
1302-
MONGODB_VERSION: latest
1303-
TOPOLOGY: server
1304-
- command: subprocess.exec
1305-
type: test
1306-
params:
1307-
working_dir: src
1308-
binary: bash
1309-
args:
1310-
- .evergreen/run-nextest-archive.sh
1311-
include_expansions_in_env:
1312-
- DRIVERS_TOOLS
1313-
- PROJECT_DIRECTORY
1314-
- SINGLE_MONGOS_LB_URI
1315-
- MULTI_MONGOS_LB_URI
1316-
- MONGODB_URI
1317-
- PATH
1318-
- LD_LIBRARY_PATH
1275+
display_name: ${ARCHIVE_FILE}
13191276

13201277
#############
13211278
# Functions #
@@ -1621,6 +1578,7 @@ functions:
16211578
- ZSTD
16221579
- ZLIB
16231580
- SNAPPY
1581+
- ARCHIVE_FILE
16241582

16251583
"run sync tests":
16261584
- command: subprocess.exec

.evergreen/features.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
FEATURE_FLAGS=()
4+
5+
STANDARD_FEATURES=("tracing-unstable" "cert-key-password" "opentelemetry" "error-backtrace")
6+
7+
_join_by() {
8+
local IFS="$1"
9+
shift
10+
echo "$*"
11+
}
12+
13+
features_option() {
14+
local FILTERED=()
15+
for FEAT in "${FEATURE_FLAGS[@]}"; do
16+
[[ "${FEAT}" != "" ]] && FILTERED+=("${FEAT}")
17+
done
18+
if ((${#FILTERED[@]} != 0)); then
19+
echo "--features $(_join_by , "${FILTERED[@]}")"
20+
fi
21+
}

.evergreen/generate-tasks/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9+
10+
[workspace]

.evergreen/generate-tasks/src/main.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@ tasks:"
2121
tags: [{version}, {top_name}]
2222
commands:
2323
- func: \"bootstrap mongo-orchestration\"
24+
type: setup
25+
vars:
26+
MONGODB_VERSION: {version}
27+
TOPOLOGY: {topology}
28+
- func: \"run driver test suite\"
29+
30+
- name: test-{version}-{top_name}-archive
31+
tags: [{version}, {top_name}, archive]
32+
depends_on:
33+
- name: build-nextest-archive
34+
commands:
35+
- command: s3.get
36+
type: setup
37+
params:
38+
aws_key: ${{aws_key}}
39+
aws_secret: ${{aws_secret}}
40+
remote_file: \
41+
${{UPLOAD_BUCKET}}/${{build_variant}}/${{revision}}/\
42+
${{build_id}}-nextest-archive.tar.zst
43+
bucket: mciuploads
44+
local_file: src/nextest-archive.tar.zst
45+
- func: \"bootstrap mongo-orchestration\"
46+
type: setup
2447
vars:
2548
MONGODB_VERSION: {version}
2649
TOPOLOGY: {topology}

.evergreen/run-tests.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -o pipefail
66
source .evergreen/env.sh
77
source .evergreen/cargo-test.sh
88

9-
FEATURE_FLAGS+=("tracing-unstable" "cert-key-password" "opentelemetry" "error-backtrace")
9+
FEATURE_FLAGS+=("${STANDARD_FEATURES[@]}")
1010

1111
if [ "$OPENSSL" = true ]; then
1212
FEATURE_FLAGS+=("openssl-tls")
@@ -24,6 +24,12 @@ if [ "$SNAPPY" = true ]; then
2424
FEATURE_FLAGS+=("snappy-compression")
2525
fi
2626

27+
if [[ "${ARCHIVE_FILE}" != "" ]]; then
28+
# Feature flags are set when the archive is built
29+
FEATURE_FLAGS=()
30+
CARGO_OPTIONS+=("--archive-file" "${ARCHIVE_FILE}" "--workspace-remap" "$(pwd)")
31+
fi
32+
2733
echo "cargo test options: $(cargo_test_options)"
2834

2935
set +o errexit
@@ -36,7 +42,7 @@ fi
3642
cargo_test ""
3743

3844
# cargo-nextest doesn't support doc tests
39-
RUST_BACKTRACE=1 cargo test --doc $(cargo_test_options)
40-
((CARGO_RESULT = ${CARGO_RESULT} || $?))
45+
#RUST_BACKTRACE=1 cargo test --doc $(cargo_test_options)
46+
#((CARGO_RESULT = ${CARGO_RESULT} || $?))
4147

4248
exit $CARGO_RESULT

0 commit comments

Comments
 (0)