Skip to content

Commit ef8beae

Browse files
committed
split out rustdoc tests
1 parent 924ad09 commit ef8beae

File tree

3 files changed

+75
-63
lines changed

3 files changed

+75
-63
lines changed

.evergreen/config.yml

Lines changed: 68 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ buildvariants:
6363
display_name: "Lint"
6464
run_on:
6565
- rhel8-latest-small
66+
expansions:
67+
LIBMONGOCRYPT_OS: rhel-80-64-bit
6668
tasks:
6769
- name: .lint
6870

@@ -823,27 +825,82 @@ tasks:
823825

824826
- name: check-cargo-deny
825827
commands:
826-
- func: "check cargo deny"
828+
- command: shell.exec
829+
type: test
830+
params:
831+
working_dir: src
832+
shell: bash
833+
script: |
834+
${PREPARE_SHELL}
835+
.evergreen/check-cargo-deny.sh
827836
828837
- name: check-rustfmt
829838
tags: [lint]
830839
commands:
831-
- func: "check rustfmt"
840+
- command: shell.exec
841+
type: test
842+
params:
843+
working_dir: src
844+
shell: bash
845+
script: |
846+
${PREPARE_SHELL}
847+
.evergreen/check-rustfmt.sh
832848
833849
- name: check-clippy
834850
tags: [lint]
835851
commands:
836-
- func: "check clippy"
852+
- command: shell.exec
853+
type: test
854+
params:
855+
working_dir: src
856+
shell: bash
857+
script: |
858+
${PREPARE_SHELL}
859+
.evergreen/check-clippy.sh
837860
838861
- name: check-semgrep
839862
tags: [lint]
840863
commands:
841-
- func: "check semgrep"
864+
- command: subprocess.exec
865+
type: test
866+
params:
867+
working_dir: src
868+
include_expansions_in_env:
869+
- DRIVERS_TOOLS
870+
- PROJECT_DIRECTORY
871+
- MONGOCRYPT_LIB_DIR
872+
binary: bash
873+
args:
874+
- .evergreen/check-semgrep.sh
842875

843876
- name: check-rustdoc
844877
tags: [lint]
845878
commands:
846-
- func: "check rustdoc"
879+
- command: shell.exec
880+
type: test
881+
params:
882+
working_dir: src
883+
shell: bash
884+
script: |
885+
${PREPARE_SHELL}
886+
.evergreen/check-rustdoc.sh
887+
888+
- name: test-rustdoc
889+
tags: [lint]
890+
commands:
891+
- func: "install libmongocrypt"
892+
- command: subprocess.exec
893+
type: test
894+
params:
895+
working_dir: src
896+
include_expansions_in_env:
897+
- DRIVERS_TOOLS
898+
- PROJECT_DIRECTORY
899+
- MONGOCRYPT_LIB_DIR
900+
- LD_LIBRARY_PATH
901+
binary: bash
902+
args:
903+
- .evergreen/run-rustdoc-tests.sh
847904

848905
# Driver test suite runs for the full set of versions and topologies are in
849906
# suite-tasks.yml, generated by .evergreen/generate_tasks.
@@ -1577,6 +1634,12 @@ functions:
15771634
- command: expansions.update
15781635
params:
15791636
file: src/uri-expansions.yml
1637+
# The server needs some time after startup otherwise it won't include things like
1638+
# cluster time in replies.
1639+
- command: subprocess.exec
1640+
params:
1641+
binary: bash
1642+
args: ["-c", "sleep 30s"]
15801643

15811644
"run driver test suite":
15821645
- command: subprocess.exec
@@ -1789,59 +1852,6 @@ functions:
17891852
${PREPARE_SHELL}
17901853
RUST_VERSION=${RUST_VERSION} .evergreen/compile-only.sh
17911854
1792-
"check cargo deny":
1793-
- command: shell.exec
1794-
type: test
1795-
params:
1796-
working_dir: src
1797-
shell: bash
1798-
script: |
1799-
${PREPARE_SHELL}
1800-
.evergreen/check-cargo-deny.sh
1801-
1802-
"check rustfmt":
1803-
- command: shell.exec
1804-
type: test
1805-
params:
1806-
working_dir: src
1807-
shell: bash
1808-
script: |
1809-
${PREPARE_SHELL}
1810-
.evergreen/check-rustfmt.sh
1811-
1812-
"check clippy":
1813-
- command: shell.exec
1814-
type: test
1815-
params:
1816-
working_dir: src
1817-
shell: bash
1818-
script: |
1819-
${PREPARE_SHELL}
1820-
.evergreen/check-clippy.sh
1821-
1822-
"check semgrep":
1823-
- command: subprocess.exec
1824-
type: test
1825-
params:
1826-
working_dir: src
1827-
include_expansions_in_env:
1828-
- DRIVERS_TOOLS
1829-
- PROJECT_DIRECTORY
1830-
- MONGOCRYPT_LIB_DIR
1831-
binary: bash
1832-
args:
1833-
- .evergreen/check-semgrep.sh
1834-
1835-
"check rustdoc":
1836-
- command: shell.exec
1837-
type: test
1838-
params:
1839-
working_dir: src
1840-
shell: bash
1841-
script: |
1842-
${PREPARE_SHELL}
1843-
.evergreen/check-rustdoc.sh
1844-
18451855
"upload-mo-artifacts":
18461856
- command: shell.exec
18471857
params:

.evergreen/run-rustdoc-tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
5+
source ./.evergreen/env.sh
6+
7+
cargo test --doc --package mongodb --all-features

.evergreen/run-tests.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ if [ "Windows_NT" == "$OS" ]; then
2929
export SSL_CERT_DIR=$(cygpath /etc/ssl/certs --windows)
3030
fi
3131

32-
sleep 60s
3332
cargo_test ""
3433

35-
# cargo-nextest doesn't support doc tests
36-
#RUST_BACKTRACE=1 cargo test --doc $(cargo_test_options)
37-
#((CARGO_RESULT = ${CARGO_RESULT} || $?))
38-
3934
exit $CARGO_RESULT

0 commit comments

Comments
 (0)