mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
415872990e
Create an include file of common functions used by several of the blackbox tests in testprogs and then make all the users of test_smbclient include that file so we can eliminate duplicate code. We pass the UNC to the test_smbclient function. Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Thu Apr 28 16:50:35 CEST 2016 on sn-devel-144
21 lines
335 B
PHP
Executable File
21 lines
335 B
PHP
Executable File
# Common tests
|
|
# Pulled out of existing tests to prevent duplication.
|
|
#
|
|
test_smbclient() {
|
|
name="$1"
|
|
cmd="$2"
|
|
unc="$3"
|
|
shift
|
|
shift
|
|
shift
|
|
echo "test: $name"
|
|
$VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@
|
|
status=$?
|
|
if [ x$status = x0 ]; then
|
|
echo "success: $name"
|
|
else
|
|
echo "failure: $name"
|
|
fi
|
|
return $status
|
|
}
|