-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46c921f
commit cdb4de1
Showing
41 changed files
with
698 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,60 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -ex | ||
if [ "${NO_RUN}" != "1" ] && [ "${NO_RUN}" != "true" ]; then | ||
|
||
CARGO=cargo | ||
if [ "${CROSS}" = "1" ]; then | ||
export CARGO_NET_RETRY=5 | ||
export CARGO_NET_TIMEOUT=10 | ||
set -ex | ||
|
||
cargo install cross | ||
CARGO=cross | ||
fi | ||
CARGO=cargo | ||
if [ "${CROSS}" = "1" ]; then | ||
export CARGO_NET_RETRY=5 | ||
export CARGO_NET_TIMEOUT=10 | ||
|
||
# If a test crashes, we want to know which one it was. | ||
export RUST_TEST_THREADS=1 | ||
export RUST_BACKTRACE=1 | ||
cargo install cross | ||
CARGO=cross | ||
fi | ||
|
||
# test monoio mod | ||
cd "${PROJECT_DIR}"/monoio | ||
# If a test crashes, we want to know which one it was. | ||
export RUST_TEST_THREADS=1 | ||
export RUST_BACKTRACE=1 | ||
|
||
# only enable legacy driver | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features "async-cancel,bytes,legacy,macros,utils" | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features "async-cancel,bytes,legacy,macros,utils" --release | ||
# test monoio mod | ||
cd "${PROJECT_DIR}"/monoio | ||
|
||
if [ "${TARGET}" = "x86_64-unknown-linux-gnu" ] || [ "${TARGET}" = "i686-unknown-linux-gnu" ]; then | ||
# only enable legacy driver | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features "async-cancel,bytes,legacy,macros,utils" | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features "async-cancel,bytes,legacy,macros,utils" --release | ||
|
||
# only enabled uring driver | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features "async-cancel,bytes,iouring,macros,utils" | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features "async-cancel,bytes,iouring,macros,utils" --release | ||
if [ "${TARGET}" = "x86_64-unknown-linux-gnu" ] || [ "${TARGET}" = "i686-unknown-linux-gnu" ]; then | ||
# only enabled uring driver | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features "async-cancel,bytes,iouring,macros,utils" | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features "async-cancel,bytes,iouring,macros,utils" --release | ||
fi | ||
|
||
# enable uring+legacy driver | ||
"${CARGO}" test --target "${TARGET}" | ||
"${CARGO}" test --target "${TARGET}" --release | ||
if [ "${TARGET}" != "aarch64-unknown-linux-gnu" ] && [ "${TARGET}" != "armv7-unknown-linux-gnueabihf" ] && | ||
[ "${TARGET}" != "riscv64gc-unknown-linux-gnu" ] && [ "${TARGET}" != "s390x-unknown-linux-gnu" ]; then | ||
# enable uring+legacy driver | ||
"${CARGO}" test --target "${TARGET}" | ||
"${CARGO}" test --target "${TARGET}" --release | ||
fi | ||
|
||
if [ "${CHANNEL}" == "nightly" ]; then | ||
if [ "${CHANNEL}" == "nightly" ] && ( [ "${TARGET}" = "x86_64-unknown-linux-gnu" ] || [ "${TARGET}" = "i686-unknown-linux-gnu" ] ); then | ||
"${CARGO}" test --target "${TARGET}" --all-features | ||
"${CARGO}" test --target "${TARGET}" --all-features --release | ||
fi | ||
|
||
fi | ||
# test monoio-compat mod | ||
cd "${PROJECT_DIR}"/monoio-compat | ||
|
||
# test monoio-compat mod | ||
cd "${PROJECT_DIR}"/monoio-compat | ||
"${CARGO}" test --target "${TARGET}" | ||
"${CARGO}" test --target "${TARGET}" --release | ||
|
||
"${CARGO}" test --target "${TARGET}" | ||
"${CARGO}" test --target "${TARGET}" --release | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features hyper | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features hyper --release | ||
|
||
"${CARGO}" test --target "${TARGET}" --no-default-features --features hyper | ||
"${CARGO}" test --target "${TARGET}" --no-default-features --features hyper --release | ||
if [ "${CHANNEL}" == "nightly" ]; then | ||
"${CARGO}" test --target "${TARGET}" --all-features | ||
"${CARGO}" test --target "${TARGET}" --all-features --release | ||
fi | ||
|
||
if [ "${CHANNEL}" == "nightly" ]; then | ||
"${CARGO}" test --target "${TARGET}" --all-features | ||
"${CARGO}" test --target "${TARGET}" --all-features --release | ||
# todo maybe we should test examples here ? | ||
fi | ||
|
||
# todo maybe we should test examples here ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.