ci: Move cargo test into ci/msrv.sh

We need `cargo` in our `PATH` and we already do the `PATH=...` dance in
`ci/msrv.sh`. This only worked before because we were inadvertedly
re-installing cargo when calling `ci/build.sh`, which was fixed in the
previous commit.
This commit is contained in:
Jonathan Lebon 2020-02-21 22:38:54 -05:00 committed by OpenShift Merge Robot
parent 2290999251
commit 4b15c59b77
2 changed files with 6 additions and 2 deletions

View File

@ -51,7 +51,6 @@ rust: {
sh """ sh """
set -xeuo pipefail set -xeuo pipefail
ci/msrv.sh ci/msrv.sh
cd rust && cargo test
""" """
} }
}} }}

View File

@ -7,7 +7,12 @@ MINIMUM_SUPPORTED_RUST_VERSION=1.39.0
ci/installdeps.sh ci/installdeps.sh
dnf remove -y cargo dnf remove -y cargo
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain ${MINIMUM_SUPPORTED_RUST_VERSION} -y curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain ${MINIMUM_SUPPORTED_RUST_VERSION} -y
PATH="$HOME/.cargo/bin:$PATH" SKIP_INSTALLDEPS=1 ci/build.sh |& tee out.txt export PATH="$HOME/.cargo/bin:$PATH"
SKIP_INSTALLDEPS=1 ci/build.sh |& tee out.txt
grep ${MINIMUM_SUPPORTED_RUST_VERSION} out.txt grep ${MINIMUM_SUPPORTED_RUST_VERSION} out.txt
grep "checking for cargo... $HOME/.cargo/bin/cargo" out.txt grep "checking for cargo... $HOME/.cargo/bin/cargo" out.txt
grep "checking for rustc... $HOME/.cargo/bin/rustc" out.txt grep "checking for rustc... $HOME/.cargo/bin/rustc" out.txt
# and run the tests
cd rust
cargo test