aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <k.chodorow@gmail.com>2016-01-15 09:14:24 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-01-15 09:24:43 +0000
commitcc7581dbb4f7c0e3133a41076f299688fd3899e3 (patch)
tree59321481582e9fdacc46399ab43407d6861ecdf4 /src/test
parent2fa25fd7e6251f78860637df7db3e17893e81b5c (diff)
Actually fix test_fetch to not errexit by ls-ing a non-existent directory
Fixes #769. -- Change-Id: I085b0a9c9faed45bee8cf4185a71531b95a66e14 Reviewed-on: https://github.com/bazelbuild/bazel/pull/779 MOS_MIGRATED_REVID=112228906
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/external_integration_test.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/shell/bazel/external_integration_test.sh b/src/test/shell/bazel/external_integration_test.sh
index a8b3e97982..50c04c8a7b 100755
--- a/src/test/shell/bazel/external_integration_test.sh
+++ b/src/test/shell/bazel/external_integration_test.sh
@@ -534,7 +534,6 @@ EOF
}
function test_fetch() {
- bazel clean --expunge || fail "Clean failed"
serve_jar
cat > WORKSPACE <<EOF
@@ -550,7 +549,8 @@ EOF
output_base=$(bazel info output_base)
external_dir=$output_base/external
needle=endangered
- [[ $(ls $external_dir | grep $needle) ]] && fail "$needle already in $external_dir"
+ [[ -d $external_dir/$needle ]] \
+ && fail "$needle already exists in $external_dir" || true
bazel fetch //zoo:ball-pit >& $TEST_log || fail "Fetch failed"
[[ $(ls $external_dir | grep $needle) ]] || fail "$needle not added to $external_dir"