From 71bf589af36f0c89c92317f7ed2195f6be824d5a Mon Sep 17 00:00:00 2001 From: Morgan Phillips Date: Mon, 25 Jul 2016 19:19:46 -0700 Subject: [PATCH] Fix the test-all script so that it works with directories --- test-all.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/test-all.sh b/test-all.sh index 31638a6db3..7ddd65a21d 100755 --- a/test-all.sh +++ b/test-all.sh @@ -17,16 +17,20 @@ set -e cd $(dirname "$0") topdir=$(pwd) -# Run cargo from the src/tools directory which includes all our crates for -# building cton-util. -cd "$topdir/src/tools" -PKGS="-p cretonne -p cretonne-reader -p cretonne-tools" -echo ====== Rust unit tests and debug build ====== -cargo test $PKGS -cargo build $PKGS -cargo doc +PKGS="libcretonne libreader tools" +echo ====== Rust unit tests and debug builds ====== +for PKG in $PKGS +do + pushd $topdir/src/$PKG + cargo test + cargo build + popd +done -echo ====== Rust release build ====== +# Build cton-util for parser testing. +echo ====== Rust release build and documentation ====== +cd "$topdir/src/tools" +cargo doc cargo build --release export CTONUTIL="$topdir/src/tools/target/release/cton-util"