aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/bash_completion_test.sh
diff options
context:
space:
mode:
authorGravatar Julio Merino <jmmv@google.com>2016-09-01 16:39:17 +0000
committerGravatar Klaus Aehlig <aehlig@google.com>2016-09-02 08:24:37 +0000
commit672cb580c2480c7c172fadfd4c5151bae5775245 (patch)
treed13dfab6568f2aac42e0ac31ef774f7a8f527057 /scripts/bash_completion_test.sh
parent26389edbc1595599de67742effd13ca7da829c05 (diff)
Fix tests by explicitly passing TEST_TMPDIR to mk*temp.
We need to tell mktemp to explicitly create temporary files and directories under TEST_TMPDIR. The default of picking up the TMPDIR value (which may be unset) or /tmp may not work and was causing two tests to fail. I suspect that paths outside of TEST_TMPDIR may not be writable due to our sandboxing features. -- MOS_MIGRATED_REVID=131957733
Diffstat (limited to 'scripts/bash_completion_test.sh')
-rwxr-xr-xscripts/bash_completion_test.sh2
1 files changed, 1 insertions, 1 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