From d2d8b56ddb1ce5190b7233686b83a42cf6ce1435 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 2 Jul 2018 15:17:14 -0700 Subject: [PATCH] Fix test-no_std.sh to handle the case where topdir is ".". Instead of using "cd $topdir" to get back to the top, use popd. --- cranelift/test-no_std.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cranelift/test-no_std.sh b/cranelift/test-no_std.sh index 26678c856e..568dffb638 100755 --- a/cranelift/test-no_std.sh +++ b/cranelift/test-no_std.sh @@ -14,10 +14,9 @@ function banner { # Test those packages which have no_std support. LIBS="codegen frontend wasm native module simplejit umbrella" -cd "$topdir" for LIB in $LIBS; do banner "Rust unit tests in $LIB" - cd "lib/$LIB" + pushd "lib/$LIB" >/dev/null # Test with just "core" enabled. cargo +nightly test --no-default-features --features core @@ -25,7 +24,7 @@ for LIB in $LIBS; do # Test with "core" and "std" enabled at the same time. cargo +nightly test --features core - cd "$topdir" + popd >/dev/null done banner "OK"