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
|
|
|
|
|
|
|
cd -
|