1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/testprogs/blackbox/common_test_fns.inc
Andreas Schneider 4899ece472 testprogs: Add a common test_smbclient_expect_failure() function
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-11 02:58:22 +02:00

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
}