Skip to content

Commit f866633

Browse files
p-mongop
andauthored
Move configuration rendering into MRSS (#2519)
Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent 8f31376 commit f866633

File tree

6 files changed

+44
-87
lines changed

6 files changed

+44
-87
lines changed

.evergreen/functions-config.sh

Lines changed: 27 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,31 @@
11
# This file contains functions pertaining to driver configuration in Evergreen.
22

33
show_local_instructions() {
4-
echo To test this configuration locally:
5-
params="MONGODB_VERSION=$MONGODB_VERSION TOPOLOGY=$TOPOLOGY RVM_RUBY=$RVM_RUBY"
6-
if test -n "$AUTH"; then
7-
params="$params AUTH=$AUTH"
8-
fi
9-
if test -n "$SSL"; then
10-
params="$params SSL=$SSL"
11-
fi
12-
if test -n "$COMPRESSOR"; then
13-
params="$params COMPRESSOR=$COMPRESSOR"
14-
fi
15-
if test -n "$FLE"; then
16-
params="$params FLE=$FLE"
17-
fi
18-
if test -n "$FCV"; then
19-
params="$params FCV=$FCV"
20-
fi
21-
if test -n "$MONGO_RUBY_DRIVER_LINT"; then
22-
params="$params MONGO_RUBY_DRIVER_LINT=$MONGO_RUBY_DRIVER_LINT"
23-
fi
24-
if test -n "$RETRY_READS"; then
25-
params="$params RETRY_READS=$RETRY_READS"
26-
fi
27-
if test -n "$RETRY_WRITES"; then
28-
params="$params RETRY_WRITES=$RETRY_WRITES"
29-
fi
30-
if test -n "$WITH_ACTIVE_SUPPORT"; then
31-
params="$params WITH_ACTIVE_SUPPORT=$WITH_ACTIVE_SUPPORT"
32-
fi
33-
if test -n "$SINGLE_MONGOS"; then
34-
params="$params SINGLE_MONGOS=$SINGLE_MONGOS"
35-
fi
36-
if test -n "$BSON"; then
37-
params="$params BSON=$BSON"
38-
fi
39-
if test -n "$MMAPV1"; then
40-
params="$params MMAPV1=$MMAPV1"
41-
fi
42-
if test -n "$STRESS"; then
43-
params="$params STRESS=$STRESS"
44-
fi
45-
if test -n "$FORK"; then
46-
params="$params FORK=$FORK"
47-
fi
48-
if test -n "$SOLO"; then
49-
params="$params SOLO=$SOLO"
50-
fi
51-
if test -n "$OCSP_ALGORITHM"; then
52-
params="$params OCSP_ALGORITHM=$OCSP_ALGORITHM"
53-
fi
54-
if test -n "$OCSP_STATUS"; then
55-
params="$params OCSP_STATUS=$OCSP_STATUS"
56-
fi
57-
if test -n "$OCSP_DELEGATE"; then
58-
params="$params OCSP_DELEGATE=$OCSP_DELEGATE"
59-
fi
60-
if test -n "$OCSP_MUST_STAPLE"; then
61-
params="$params OCSP_MUST_STAPLE=$OCSP_MUST_STAPLE"
62-
fi
63-
if test -n "$OCSP_CONNECTIVITY"; then
64-
params="$params OCSP_CONNECTIVITY=$OCSP_CONNECTIVITY"
65-
fi
66-
if test -n "$OCSP_VERIFIER"; then
67-
params="$params OCSP_VERIFIER=$OCSP_VERIFIER"
68-
fi
69-
if test -n "$EXTRA_URI_OPTIONS"; then
70-
params="$params EXTRA_URI_OPTIONS=$EXTRA_URI_OPTIONS"
71-
fi
72-
if test -n "$API_VERSION_REQUIRED"; then
73-
params="$params API_VERSION_REQUIRED=$API_VERSION_REQUIRED"
74-
fi
75-
# $0 has the current script being executed which is also the script that
76-
# was initially invoked EXCEPT for the AWS configurations which use the
77-
# wrapper script.
78-
if echo "$AUTH" |grep -q ^aws; then
79-
script=.evergreen/run-tests-aws-auth.sh
80-
else
81-
script="$0"
82-
fi
83-
echo ./.evergreen/test-on-docker -d $arch $params -s "$script"
4+
show_local_instructions_impl "$arch" \
5+
MONGODB_VERSION \
6+
TOPOLOGY \
7+
RVM_RUBY \
8+
AUTH \
9+
SSL \
10+
COMPRESSOR \
11+
FLE \
12+
FCV \
13+
MONGO_RUBY_DRIVER_LINT \
14+
RETRY_READS \
15+
RETRY_WRITES \
16+
WITH_ACTIVE_SUPPORT \
17+
SINGLE_MONGOS \
18+
BSON \
19+
MMAPV1 \
20+
STRESS \
21+
FORK \
22+
SOLO \
23+
OCSP_ALGORITHM \
24+
OCSP_STATUS \
25+
OCSP_DELEGATE \
26+
OCSP_MUST_STAPLE \
27+
OCSP_CONNECTIVITY \
28+
OCSP_VERIFIER \
29+
EXTRA_URI_OPTIONS \
30+
API_VERSION_REQUIRED
8431
}

.evergreen/run-tests-ecs.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ set -e
44
# IMPORTANT: Don't set trace (-x) to avoid secrets showing up in the logs.
55
set +x
66

7-
. `dirname "$0"`/../spec/shared/shlib/distro.sh
8-
. `dirname "$0"`/../spec/shared/shlib/set_env.sh
7+
MRSS_ROOT=`dirname "$0"`/../spec/shared
8+
9+
. $MRSS_ROOT/shlib/distro.sh
10+
. $MRSS_ROOT/shlib/set_env.sh
11+
. $MRSS_ROOT/shlib/config.sh
912
. `dirname "$0"`/functions.sh
1013
. `dirname "$0"`/functions-config.sh
1114

.evergreen/run-tests-kerberos-integration.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ set -e
44
# IMPORTANT: Don't set trace (-x) to avoid secrets showing up in the logs.
55
set +x
66

7-
. `dirname "$0"`/../spec/shared/shlib/distro.sh
8-
. `dirname "$0"`/../spec/shared/shlib/set_env.sh
7+
MRSS_ROOT=`dirname "$0"`/../spec/shared
8+
9+
. $MRSS_ROOT/shlib/distro.sh
10+
. $MRSS_ROOT/shlib/set_env.sh
11+
. $MRSS_ROOT/shlib/config.sh
912
. `dirname "$0"`/functions.sh
1013
. `dirname "$0"`/functions-kerberos.sh
1114
. `dirname "$0"`/functions-config.sh

.evergreen/run-tests-kerberos-unit.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22

33
set -ex
44

5-
. `dirname "$0"`/../spec/shared/shlib/distro.sh
6-
. `dirname "$0"`/../spec/shared/shlib/set_env.sh
5+
MRSS_ROOT=`dirname "$0"`/../spec/shared
6+
7+
. $MRSS_ROOT/shlib/distro.sh
8+
. $MRSS_ROOT/shlib/set_env.sh
9+
. $MRSS_ROOT/shlib/config.sh
710
. `dirname "$0"`/functions.sh
811
. `dirname "$0"`/functions-config.sh
912

.evergreen/run-tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ MRSS_ROOT=`dirname "$0"`/../spec/shared
2727
. $MRSS_ROOT/shlib/distro.sh
2828
. $MRSS_ROOT/shlib/set_env.sh
2929
. $MRSS_ROOT/shlib/server.sh
30+
. $MRSS_ROOT/shlib/config.sh
3031
. `dirname "$0"`/functions.sh
3132
. `dirname "$0"`/functions-aws.sh
3233
. `dirname "$0"`/functions-config.sh

spec/shared

0 commit comments

Comments
 (0)