diff options
-rwxr-xr-x | source3/script/tests/test_veto_files.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/script/tests/test_veto_files.sh b/source3/script/tests/test_veto_files.sh index 5ecfb53b8a4..e246e864b32 100755 --- a/source3/script/tests/test_veto_files.sh +++ b/source3/script/tests/test_veto_files.sh @@ -29,6 +29,10 @@ incdir=$(dirname "$0")/../../../testprogs/blackbox failed=0 +TMPDIR=${PREFIX_ABS}/$(basename "${0}") +mkdir -p "${TMPDIR}" || exit 1 +cd "${TMPDIR}" || exit 1 + # # Cleanup function. # @@ -51,7 +55,7 @@ smbclient_get_expect_error() { filename1="$1" expected_error="$2" - tmpfile=$PREFIX/smbclient_interactive_prompt_commands + tmpfile=${TMPDIR}/smbclient_interactive_prompt_commands cat >"$tmpfile" <<EOF get $filename1 got_file quit @@ -88,7 +92,7 @@ smbclient_create_expect_error() { filename="$1.$$" expected_error="$2" - tmpfile=$PREFIX/smbclient_interactive_prompt_commands + tmpfile=${TMPDIR}/smbclient_interactive_prompt_commands cat >"$tmpfile" <<EOF put $tmpfile $filename quit @@ -245,4 +249,6 @@ testit "get_veto_file" test_get_veto_file || failed=$(("$failed" + 1)) do_cleanup +cd "${PREFIX_ABS}" && rm -rf ${TMPDIR} + exit "$failed" |