Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .evergreen/build-nextest-archive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -o errexit
set -o pipefail

source .evergreen/env.sh
source .evergreen/features.sh

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

add_conditional_features

if [[ "$IN_USE_ENCRYPTION" = true ]]; then
FEATURE_FLAGS+=("in-use-encryption" "azure-kms" "text-indexes-unstable" "aws-auth")
fi

cargo nextest archive --workspace $(features_option) --archive-file nextest-archive.tar.zst
29 changes: 15 additions & 14 deletions .evergreen/cargo-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@

CARGO_OPTIONS=()
TEST_OPTIONS=()
FEATURE_FLAGS=()
CARGO_RESULT=0

join_by() {
local IFS="$1"
shift
echo "$*"
}
. .evergreen/features.sh

if [[ -f nextest-archive.tar.zst ]]; then
WORKSPACE_ROOT="$(pwd)"
if [[ "Windows_NT" = "$OS" ]]; then
WORKSPACE_ROOT="$(cygpath -w ${WORKSPACE_ROOT})"
fi
CARGO_OPTIONS+=("--archive-file" "nextest-archive.tar.zst" "--workspace-remap" "${WORKSPACE_ROOT}")
fi


cargo_test_options() {
local FILTERED=()
for FEAT in "${FEATURE_FLAGS[@]}"; do
[[ "${FEAT}" != "" ]] && FILTERED+=("${FEAT}")
done
local FEATURE_OPTION=""
if ((${#FILTERED[@]} != 0)); then
FEATURE_OPTION="--features $(join_by , "${FILTERED[@]}")"
FEATURES="$(features_option)"
if [[ -f nextest-archive.tar.zst ]]; then
# Feature flags are set when the archive is built
FEATURES=""
fi
echo $1 ${CARGO_OPTIONS[@]} ${FEATURE_OPTION} -- ${TEST_OPTIONS[@]}
echo $1 ${CARGO_OPTIONS[@]} "${FEATURES}" -- ${TEST_OPTIONS[@]}
}

cargo_test() {
Expand Down
Loading