mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
4899ece472
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
39 lines
614 B
PHP
Executable File
39 lines
614 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
|
|
}
|
|
|
|
test_smbclient_expect_failure() {
|
|
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 "failure: $name"
|
|
else
|
|
echo "success: $name"
|
|
fi
|
|
return $status
|
|
}
|