Skip to content

Commit 8eba405

Browse files
authored
minor: merge test shell scripts (#753)
1 parent b016be2 commit 8eba405

File tree

6 files changed

+39
-82
lines changed

6 files changed

+39
-82
lines changed

.evergreen/run-async-std-atlas-tests.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

.evergreen/run-async-std-tests.sh

Lines changed: 0 additions & 31 deletions
This file was deleted.

.evergreen/run-atlas-tests.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
set -o errexit
44

55
if [ "$ASYNC_RUNTIME" = "tokio" ]; then
6-
.evergreen/run-tokio-atlas-tests.sh
6+
OPTIONS=""
77
elif [ "$ASYNC_RUNTIME" = "async-std" ]; then
8-
.evergreen/run-async-std-atlas-tests.sh
8+
OPTIONS=" --no-default-features --features async-std-runtime"
99
else
1010
echo "invalid async runtime: ${ASYNC_RUNTIME}" >&2
1111
exit 1
1212
fi
13+
14+
source ./.evergreen/configure-rust.sh
15+
RUST_BACKTRACE=1 cargo test atlas_connectivity ${OPTIONS}

.evergreen/run-tests.sh

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,44 @@
11
#!/bin/bash
22

33
set -o errexit
4+
set -o pipefail
5+
6+
source ./.evergreen/env.sh
7+
8+
OPTIONS="-- -Z unstable-options --format json --report-time"
9+
if [ "$SINGLE_THREAD" = true ]; then
10+
OPTIONS="$OPTIONS --test-threads=1"
11+
fi
12+
13+
FEATURE_FLAGS="zstd-compression,snappy-compression,zlib-compression,${TLS_FEATURE}"
414

515
if [ "$ASYNC_RUNTIME" = "tokio" ]; then
6-
.evergreen/run-tokio-tests.sh
16+
ASYNC_FEATURE_FLAGS=${FEATURE_FLAGS}
17+
SYNC_FEATURE_FLAGS="tokio-sync,${FEATURE_FLAGS}"
718
elif [ "$ASYNC_RUNTIME" = "async-std" ]; then
8-
.evergreen/run-async-std-tests.sh
19+
OPTIONS="--no-default-features ${OPTIONS}"
20+
ASYNC_FEATURE_FLAGS="async-std-runtime,${FEATURE_FLAGS}"
21+
SYNC_FEATURE_FLAGS="sync,${FEATURE_FLAGS}"
922
else
1023
echo "invalid async runtime: ${ASYNC_RUNTIME}" >&2
1124
exit 1
1225
fi
26+
27+
echo "cargo test options: --features ${ASYNC_FEATURE_FLAGS} ${OPTIONS}"
28+
29+
set +o errexit
30+
CARGO_RESULT=0
31+
32+
RUST_BACKTRACE=1 cargo test --features $ASYNC_FEATURE_FLAGS $OPTIONS | tee results.json
33+
(( CARGO_RESULT = CARGO_RESULT || $? ))
34+
cat results.json | cargo2junit > async-tests.xml
35+
RUST_BACKTRACE=1 cargo test sync --features $SYNC_FEATURE_FLAGS $OPTIONS | tee sync-tests.json
36+
(( CARGO_RESULT = CARGO_RESULT || $? ))
37+
cat sync-tests.json | cargo2junit > sync-tests.xml
38+
RUST_BACKTRACE=1 cargo test --doc sync --features $SYNC_FEATURE_FLAGS $OPTIONS | tee sync-doc-tests.json
39+
(( CARGO_RESULT = CARGO_RESULT || $? ))
40+
cat sync-doc-tests.json | cargo2junit > sync-doc-tests.xml
41+
42+
junit-report-merger results.xml async-tests.xml sync-tests.xml sync-doc-tests.xml
43+
44+
exit $CARGO_RESULT

.evergreen/run-tokio-atlas-tests.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

.evergreen/run-tokio-tests.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)