diff options
author | Andreas Schneider <asn@samba.org> | 2023-04-19 20:45:52 +0200 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2023-04-28 14:16:11 +0000 |
commit | a26cbb56b5b7be67b261f9646799fb70651ebca3 (patch) | |
tree | 8181e683f137e999360532101118b3df2172b676 | |
parent | 2a20fbdbd7860582f332d8e38dbca2446e2bf0fa (diff) | |
download | samba-a26cbb56b5b7be67b261f9646799fb70651ebca3.tar.gz |
s3:tests: Create a temporary directory for test_veto_files.sh
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15360
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit b5a66840e3057cbff85fe6cd231310c4a9cfb34b)
-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" |