Use known-working versions for tests (#900)

This commit is contained in:
Félix Saparelli 2023-03-13 18:11:29 +13:00 committed by GitHub
parent 5f1d5ce559
commit e89b8e2463
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View file

@ -4,7 +4,7 @@ set -euxo pipefail
unset CARGO_INSTALL_ROOT unset CARGO_INSTALL_ROOT
crates="b3sum cargo-release cargo-binstall cargo-watch miniserve sccache" crates="b3sum@1.3.3 cargo-release@0.24.5 cargo-binstall@0.20.1 cargo-watch@8.4.0 miniserve@0.23.0 sccache@0.3.3"
export CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home') export CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home')
othertmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-test') othertmpdir=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-test')

View file

@ -14,19 +14,19 @@ cp "./$1" "$CARGO_HOME/bin"
# now we're running the CARGO_HOME/bin/cargo-binstall (via cargo): # now we're running the CARGO_HOME/bin/cargo-binstall (via cargo):
# self update replacing no-symlinks with no-symlinks # self update replacing no-symlinks with no-symlinks
cargo binstall --no-confirm --no-symlinks --force cargo-binstall cargo binstall --no-confirm --no-symlinks --force cargo-binstall@0.20.1
# self update replacing no-symlinks with symlinks # self update replacing no-symlinks with symlinks
cp "./$1" "$CARGO_HOME/bin" cp "./$1" "$CARGO_HOME/bin"
cargo binstall --no-confirm --force cargo-binstall cargo binstall --no-confirm --force cargo-binstall@0.20.1
# self update replacing symlinks with symlinks # self update replacing symlinks with symlinks
ln -snf "$(pwd)/cargo-binstall" "$CARGO_HOME/bin/cargo-binstall" ln -snf "$(pwd)/cargo-binstall" "$CARGO_HOME/bin/cargo-binstall"
cargo binstall --no-confirm --force cargo-binstall cargo binstall --no-confirm --force cargo-binstall@0.20.1
# self update replacing symlinks with no-symlinks # self update replacing symlinks with no-symlinks
ln -snf "$(pwd)/cargo-binstall" "$CARGO_HOME/bin/cargo-binstall" ln -snf "$(pwd)/cargo-binstall" "$CARGO_HOME/bin/cargo-binstall"
cargo binstall --no-confirm --force --no-symlinks cargo-binstall cargo binstall --no-confirm --force --no-symlinks cargo-binstall@0.20.1

View file

@ -8,7 +8,7 @@ export CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home')
export PATH="$CARGO_HOME/bin:$PATH" export PATH="$CARGO_HOME/bin:$PATH"
## Test --disable-strategies ## Test --disable-strategies
"./$1" binstall --no-confirm --disable-strategies quick-install,compile cargo-update "./$1" binstall --no-confirm --disable-strategies quick-install,compile cargo-update@11.1.2
exit_code="$?" exit_code="$?"
if [ "$exit_code" != 94 ]; then if [ "$exit_code" != 94 ]; then
@ -17,7 +17,7 @@ if [ "$exit_code" != 94 ]; then
fi fi
## Test --strategies ## Test --strategies
"./$1" binstall --no-confirm --strategies crate-meta-data cargo-update "./$1" binstall --no-confirm --strategies crate-meta-data cargo-update@11.1.2
exit_code="$?" exit_code="$?"
if [ "$exit_code" != 94 ]; then if [ "$exit_code" != 94 ]; then
@ -26,4 +26,4 @@ if [ "$exit_code" != 94 ]; then
fi fi
## Test compile-only strategy ## Test compile-only strategy
"./$1" binstall --no-confirm --strategies compile cargo-quickinstall "./$1" binstall --no-confirm --strategies compile cargo-quickinstall@0.2.8

View file

@ -11,6 +11,6 @@ export PATH="$CARGO_HOME/bin:$PATH"
--force \ --force \
--min-tls-version "${2:-1.3}" \ --min-tls-version "${2:-1.3}" \
--no-confirm \ --no-confirm \
cargo-binstall cargo-binstall@0.20.1
# Test that the installed binaries can be run # Test that the installed binaries can be run
cargo binstall --help >/dev/null cargo binstall --help >/dev/null

View file

@ -13,5 +13,5 @@ mkdir -p "$othertmpdir/bin"
cp "./$1" "$othertmpdir/bin/" cp "./$1" "$othertmpdir/bin/"
cargo binstall --no-confirm cargo-watch cargo binstall --no-confirm cargo-watch@8.4.0
cargo uninstall cargo-watch cargo uninstall cargo-watch