Skip to content

Commit

Permalink
DRIVERS-3002 Add download-mongodb capabilities to mongodl (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Oct 15, 2024
1 parent 19e4265 commit 9142b70
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 40 deletions.
62 changes: 60 additions & 2 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,49 @@ functions:
cd ${PROJECT_DIRECTORY}
make test
"run mongodl test partial":
- command: shell.exec
type: test
params:
shell: bash
script: |-
set -o errexit
cd ${DRIVERS_TOOLS}/.evergreen
. find-python3.sh
PYTHON=$(ensure_python3)
echo "Using PYTHON: $PYTHON"
$PYTHON mongodl.py --edition enterprise --version 7.0 --component archive-debug --no-download
$PYTHON mongodl.py --edition enterprise --version 7.0 --component cryptd --test
"run mongodl test full":
- command: shell.exec
type: test
params:
shell: bash
script: |-
set -o errexit
cd ${DRIVERS_TOOLS}/.evergreen
. find-python3.sh
PYTHON=$(ensure_python3 2>/dev/null)
echo "Using PYTHON: $PYTHON"
# Ensure that all distros are accounted for in DISTRO_ID_TO_TARGET
export VALIDATE_DISTROS=1
$PYTHON mongodl.py --list
if [ "$OS" != "Windows_NT" ]; then
$PYTHON mongodl.py --edition enterprise --version 7.0.1 --component archive-debug --test
fi
$PYTHON mongodl.py --edition enterprise --version 3.6 --component archive --test
$PYTHON mongodl.py --edition enterprise --version 4.0 --component archive --test
$PYTHON mongodl.py --edition enterprise --version 4.2 --component archive --test
$PYTHON mongodl.py --edition enterprise --version 4.4 --component archive --test
$PYTHON mongodl.py --edition enterprise --version 5.0 --component archive --test
$PYTHON mongodl.py --edition enterprise --version 6.0 --component crypt_shared --test
$PYTHON mongodl.py --edition enterprise --version 8.0 --component archive --test
$PYTHON mongodl.py --edition enterprise --version rapid --component archive --test
$PYTHON mongodl.py --edition enterprise --version latest --component archive --out $(pwd)
$PYTHON mongodl.py --edition enterprise --version v6.0-perf --component cryptd --test
$PYTHON mongodl.py --edition enterprise --version v8.0-perf --component cryptd --test
"teardown assets":
- command: subprocess.exec
params:
Expand Down Expand Up @@ -926,6 +969,16 @@ tasks:
commands:
- func: "run install binaries test"

- name: "test-mongodl-full"
tags: ["pr"]
commands:
- func: "run mongodl test full"

- name: "test-mongodl-partial"
tags: ["pr"]
commands:
- func: "run mongodl test partial"

# }}}

task_groups:
Expand Down Expand Up @@ -1358,6 +1411,7 @@ buildvariants:
then:
add_tasks:
- "test-install-binaries"
- "test-mongodl-full"
- "test-8.0-standalone-require-api"

- matrix_name: "tests-os-requires-50"
Expand All @@ -1382,7 +1436,9 @@ buildvariants:
ssl: "ssl"
os-requires-50: "*"
then:
add_tasks: ["test-install-binaries"]
add_tasks:
- "test-install-binaries"
- "test-mongodl-partial"

- matrix_name: "tests-os-requires-70"
matrix_spec: {"os-requires-70": "*", auth: "*", ssl: "*" }
Expand All @@ -1403,7 +1459,9 @@ buildvariants:
ssl: "ssl"
os-requires-70: "*"
then:
add_tasks: ["test-install-binaries"]
add_tasks:
- "test-install-binaries"
- "test-mongodl-partial"

# Storage Engine Tests on Ubuntu 20.04
- matrix_name: "tests-storage-engines"
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/download-mongodb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ get_mongodb_download_url_for ()
VERSION_MONGOSH="2.1.1"
# Set VERSION_RAPID to the latest rapid release each quarter.
VERSION_RAPID="7.3.4"
VERSION_80="8.0.1-rc0"
VERSION_70="7.0.14"
VERSION_80="8.0.1"
VERSION_70="7.0.15-rc1"
VERSION_60="6.0.18"
VERSION_50="5.0.29"

Expand Down
11 changes: 9 additions & 2 deletions .evergreen/find-python3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,15 @@ is_python3() (
echo " - $bin: $version_output"

# shellcheck disable=SC2091
if ! $("$bin" -c "import sys; exit(sys.version_info[0] == 3 and sys.version_info[1] == 12)"); then
echo "Detected Python 3.12. Skipping due to failures to start mock KMS server. Refer: DRIVERS-2743"
if ! $("$bin" -c "import sys; exit(sys.version_info[0] == 3 and sys.version_info[1] >= 12)"); then
echo "Detected Python 3.12+. Skipping due to failures to start mock KMS server. Refer: DRIVERS-2743"
return 1
fi

# shellcheck disable=SC2091
if ! $("$bin" -c "import sys; exit(sys.version_info[0] == 3 and sys.version_info[1] < 8)"); then
version=$($bin --version)
echo "Detected EOL Python ${version}, skipping."
return 1
fi

Expand Down
Loading

0 comments on commit 9142b70

Please sign in to comment.