Improve the DO_BENCH error message
Benchmarking requires a non-stable toolchain not a nightly toolchain i.e., includes beta. Improve the error output to indicate as such.
This commit is contained in:
parent
a11cf07501
commit
61c560baba
|
@ -12,11 +12,16 @@ fi
|
|||
cargo --version
|
||||
rustc --version
|
||||
|
||||
# Work out if we are using a nightly toolchain.
|
||||
# Some tests require certain toolchain types.
|
||||
NIGHTLY=false
|
||||
STABLE=true
|
||||
if cargo --version | grep nightly; then
|
||||
STABLE=false
|
||||
NIGHTLY=true
|
||||
fi
|
||||
if cargo --version | grep beta; then
|
||||
STABLE=false
|
||||
fi
|
||||
|
||||
# Pin dependencies as required if we are using MSRV toolchain.
|
||||
if cargo --version | grep "1\.41"; then
|
||||
|
@ -109,13 +114,11 @@ fi
|
|||
# Bench if told to, only works with non-stable toolchain (nightly, beta).
|
||||
if [ "$DO_BENCH" = true ]
|
||||
then
|
||||
if [ "$NIGHTLY" = false ]
|
||||
then
|
||||
if [ -n "$RUSTUP_TOOLCHAIN" ]
|
||||
then
|
||||
echo "RUSTUP_TOOLCHAIN is set to a non-nightly toolchain but DO_BENCH requires a nightly toolchain"
|
||||
if [ "$STABLE" = true ]; then
|
||||
if [ -n "$RUSTUP_TOOLCHAIN" ]; then
|
||||
echo "RUSTUP_TOOLCHAIN is set to a stable toolchain but DO_BENCH requires a non-stable (beta, nightly) toolchain"
|
||||
else
|
||||
echo "DO_BENCH requires a nightly toolchain"
|
||||
echo "DO_BENCH requires a non-stable (beta, nightly) toolchain"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue