Skip to content

Commit

Permalink
feat: use nextest in scripts/test
Browse files Browse the repository at this point in the history
  • Loading branch information
snormore committed Jun 11, 2024
1 parent a5b6e20 commit c88e240
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions scripts/prepare
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ case "$OS" in
exit 1
;;
esac

# Install cargo-binstall if necessary
if ! cargo binstall --version &> /dev/null; then
cargo install cargo-binstall
fi

# Install cargo-nextest using cargo binstall if necessary
if ! cargo nextest --version &> /dev/null; then
cargo binstall cargo-nextest --no-confirm
fi
8 changes: 4 additions & 4 deletions scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ script_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
. "${script_dir}"/prepare

# Build the workspace
echo "Running cargo build on workspace..."
cargo test "$@"
echo "Running workspace tests..."
cargo nextest run "$@"

# List of crates that are known to not build successfully.
# TODO(snormore): Fix these crates so they build successfully.
Expand Down Expand Up @@ -45,8 +45,8 @@ eval "$find_command" | while read dir; do
cd "$dir"

if [ -f Cargo.toml ]; then
echo "Running cargo test in $dir..."
cargo test "$@"
echo "Running tests in $dir..."
cargo nextest run "$@"
fi
)
done

0 comments on commit c88e240

Please sign in to comment.