From 84c1a55664d0f6461eabeb12176f8dca1271a23a Mon Sep 17 00:00:00 2001 From: laszlocsomor Date: Wed, 13 Sep 2017 10:21:20 +0200 Subject: bazel_bootstrap_distfile_test: add logging Add logging to bazel_bootstrap_distfile_test.sh and to buildenv.sh in hopes of catching this bug: https://github.com/bazelbuild/bazel/issues/3618 For justification, see: https://github.com/bazelbuild/bazel/issues/3618#issuecomment-328857891 RELNOTES: none PiperOrigin-RevId: 168508723 --- scripts/bootstrap/buildenv.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/bootstrap') diff --git a/scripts/bootstrap/buildenv.sh b/scripts/bootstrap/buildenv.sh index 88d7e4fc45..5c3682187c 100755 --- a/scripts/bootstrap/buildenv.sh +++ b/scripts/bootstrap/buildenv.sh @@ -166,7 +166,9 @@ function tempdir() { local DIR="$(mktemp -d "${tmp%%/}/bazel_XXXXXXXX")" mkdir -p "${DIR}" local DIRBASE=$(basename "${DIR}") - eval "cleanup_tempdir_${DIRBASE}() { rm -rf '${DIR}' >&/dev/null || true ; }" + # TODO(laszlocsomor): Remove the "[ -n ... ] && echo ... ;" part from the + # following command after we fixed https://github.com/bazelbuild/bazel/issues/3618. + eval "cleanup_tempdir_${DIRBASE}() { [ -n \"\$TEST_TMPDIR\" ] && echo \"DEBUG[$0 (\$(date))] deleting ($DIR)\" ; rm -rf '${DIR}' >&/dev/null || true ; }" atexit cleanup_tempdir_${DIRBASE} NEW_TMPDIR="${DIR}" } -- cgit v1.2.3