aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/bash_completion_test.sh2
-rwxr-xr-xsrc/test/shell/bazel/bazel_rules_test.sh3
2 files changed, 2 insertions, 3 deletions
diff --git a/scripts/bash_completion_test.sh b/scripts/bash_completion_test.sh
index 82a0fa3411..1f261bc373 100755
--- a/scripts/bash_completion_test.sh
+++ b/scripts/bash_completion_test.sh
@@ -99,7 +99,7 @@ assert_expansion() {
# in STDERR receiving a string containing regex unexpected-error.
assert_expansion_error_not_contains() {
local prefix=$1 not_expected=$2 flags=${3:-}
- local temp_file=$(mktemp -t tmp.stderr.XXXXXX)
+ local temp_file="$(mktemp "${TEST_TMPDIR}/tmp.stderr.XXXXXX")"
for i in ${COMMAND_ALIASES[@]}; do
local nprefix="$i "
expand "$nprefix\t" "$flags" "$temp_file" > /dev/null
diff --git a/src/test/shell/bazel/bazel_rules_test.sh b/src/test/shell/bazel/bazel_rules_test.sh
index cd510872fe..b34a26bb77 100755
--- a/src/test/shell/bazel/bazel_rules_test.sh
+++ b/src/test/shell/bazel/bazel_rules_test.sh
@@ -231,8 +231,7 @@ genrule(
EOF
local old_path="${PATH}"
local old_tmpdir="${TMPDIR-}"
- local effective_tmpdir="${TMPDIR:-/tmp}"
- local new_tmpdir=$(mktemp -d "${effective_tmpdir}/newfancytmpdirXXXXXX")
+ local new_tmpdir="$(mktemp -d "${TEST_TMPDIR}/newfancytmpdirXXXXXX")"
[ -d "${new_tmpdir}" ] || \
fail "Could not create new temporary directory ${new_tmpdir}"
export PATH="/bin:/usr/bin:/random/path"