[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Tue Mar 16 22:09:01 UTC 2021
The branch, master has been updated
via 78208c62c15 selftest: fix cleanup of test_printing_var_exp.sh
from f5c8b1aa834 Bug 9931: change pytalloc source to LGPL
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 78208c62c154545fc45d87bfce24c5fffd1e33d9
Author: Ralph Boehme <slow at samba.org>
Date: Tue Mar 16 14:12:23 2021 +0100
selftest: fix cleanup of test_printing_var_exp.sh
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14668
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Mar 16 22:08:10 UTC 2021 on sn-devel-184
-----------------------------------------------------------------------
Summary of changes:
.../tests/printing/printing_var_exp_lpr_cmd.sh | 6 ++--
source3/script/tests/test_printing_var_exp.sh | 34 +++++++++++++++++-----
2 files changed, 31 insertions(+), 9 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh b/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh
index 4a56a15eb94..0d99b8ac01e 100755
--- a/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh
+++ b/source3/script/tests/printing/printing_var_exp_lpr_cmd.sh
@@ -1,7 +1,9 @@
#!/bin/bash
-rm -f /tmp/printing_var_exp.log
+logfile=/tmp/$USER_printing_var_exp.log
+
+rm -f "$logfile"
for i in $(seq 1 $#) ; do
- eval echo "arg $i: \$$i" >> /tmp/printing_var_exp.log
+ eval echo "arg $i: \$$i" >> "$logfile"
done
diff --git a/source3/script/tests/test_printing_var_exp.sh b/source3/script/tests/test_printing_var_exp.sh
index 6cfd6c00f29..21fe5b4913f 100755
--- a/source3/script/tests/test_printing_var_exp.sh
+++ b/source3/script/tests/test_printing_var_exp.sh
@@ -22,15 +22,35 @@ incdir=`dirname $0`/../../../testprogs/blackbox
smbclient="$BINDIR/smbclient"
test_var_expansion() {
+ logfile=/tmp/$USER_printing_var_exp.log
+
$smbclient -U $DOMAIN/$USERNAME%$PASSWORD \
//$SERVER_IP/print_var_exp \
- -c "print $SRCDIR/testdata/printing/example.ps" || return 1
-
- cat /tmp/printing_var_exp.log
-
- grep "Windows user: $USERNAME" /tmp/printing_var_exp.log || return 1
- grep "UNIX user: $USERNAME" /tmp/printing_var_exp.log || return 1
- grep "Domain: $DOMAIN" /tmp/printing_var_exp.log || return 1
+ -c "print $SRCDIR/testdata/printing/example.ps"
+ if [ $? -ne 0 ] ; then
+ rm -f "$logfile"
+ return 1
+ fi
+ cat "$logfile"
+
+ grep "Windows user: $USERNAME" "$logfile"
+ if [ $? -ne 0 ] ; then
+ rm -f "$logfile"
+ return 1
+ fi
+ grep "UNIX user: $USERNAME" "$logfile"
+ if [ $? -ne 0 ] ; then
+ rm -f "$logfile"
+ return 1
+ fi
+ grep "Domain: $DOMAIN" "$logfile"
+ if [ $? -ne 0 ] ; then
+ rm -f "$logfile"
+ return 1
+ fi
+
+ rm -f "$logfile"
+ return 0
}
testit "Test variable expansion for '%U', '%u' and '%D'" \
--
Samba Shared Repository
More information about the samba-cvs
mailing list