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:56:13 +0000 |
commit | 647c7c75f8f24e1f33047697b55fc79f35dfb134 (patch) | |
tree | 73460e8975659ed5fa2f4d3119fccead7b711f97 | |
parent | 65168f33f95906b2c9fb38465c8ab2e799d3942d (diff) | |
download | samba-647c7c75f8f24e1f33047697b55fc79f35dfb134.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" |