From ddf967962f964567a1e810a2c3e0d3a089f221fe Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 12 Sep 2017 13:27:58 -0700 Subject: [PATCH] Use --all in some scripts. (#154) This avoids the need to list all the packages in test-all.sh. --- cranelift/format-all.sh | 6 +----- cranelift/test-all.sh | 9 ++------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/cranelift/format-all.sh b/cranelift/format-all.sh index d9e97f1026..6ccac9c289 100755 --- a/cranelift/format-all.sh +++ b/cranelift/format-all.sh @@ -6,12 +6,8 @@ set -e cd $(dirname "$0") -src=$(pwd) # Make sure we can find rustfmt. export PATH="$PATH:$HOME/.cargo/bin" -for crate in $(find "$src" -name Cargo.toml); do - cd $(dirname "$crate") - cargo fmt -- "$@" -done +exec cargo fmt --all -- "$@" diff --git a/cranelift/test-all.sh b/cranelift/test-all.sh index 41b2b96f50..a5b2e92066 100755 --- a/cranelift/test-all.sh +++ b/cranelift/test-all.sh @@ -40,14 +40,9 @@ if [ -n "$needcheck" ]; then touch $tsfile || echo no target directory fi -PKGS="cretonne cretonne-reader cretonne-tools cretonne-frontend cretonne-wasm \ - filecheck " cd "$topdir" -for PKG in $PKGS -do - banner "Rust $PKG unit tests" - cargo test -p $PKG -done +banner "Rust unit tests" +cargo test --all # Build cton-util for parser testing. cd "$topdir"