2018-01-31 19:13:50 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
2019-06-18 13:06:16 +00:00
|
|
|
EXTRA_ARGS=""
|
|
|
|
|
|
|
|
if [ -n "${TARGET-}" ]; then
|
|
|
|
# Tests build in debug mode are prohibitively
|
|
|
|
# slow when ran under emulation so that
|
|
|
|
# e.g. Travis CI will hit timeouts.
|
|
|
|
EXTRA_ARGS="--release --target=${TARGET}"
|
|
|
|
export RUSTFLAGS="--cfg debug_assertions"
|
|
|
|
fi
|
|
|
|
|
2018-01-31 19:13:50 +00:00
|
|
|
cd $(dirname $0)
|
|
|
|
|
2019-06-18 13:06:16 +00:00
|
|
|
time cargo test --all ${EXTRA_ARGS}
|
2018-01-31 19:13:50 +00:00
|
|
|
|
2019-06-19 15:22:42 +00:00
|
|
|
time cargo test --all --features threadsafe
|
|
|
|
|
2018-01-31 19:13:50 +00:00
|
|
|
cd -
|