summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-03-29 11:53:18 +0200
committerAndrew Bartlett <abartlet@samba.org>2017-04-10 01:11:19 +0200
commit31f0b313084050389f7967171935753192838bbe (patch)
treefad464b7df063551ab1a136743604692192c496e /testprogs
parent20404e19b900af7ae30e0897323b52eb51e7f950 (diff)
downloadsamba-31f0b313084050389f7967171935753192838bbe.tar.gz
testprogs/blackbox: use subunit_ helper functions in test_smbclient_*
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12709 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/blackbox/common_test_fns.inc16
1 files changed, 8 insertions, 8 deletions
diff --git a/testprogs/blackbox/common_test_fns.inc b/testprogs/blackbox/common_test_fns.inc
index aff1aa9dc79..7e54c673777 100755
--- a/testprogs/blackbox/common_test_fns.inc
+++ b/testprogs/blackbox/common_test_fns.inc
@@ -8,13 +8,13 @@ test_smbclient() {
shift
shift
shift
- echo "test: $name"
- $VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@
+ subunit_start_test "$name"
+ output=`$VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@ 2>&1`
status=$?
if [ x$status = x0 ]; then
- echo "success: $name"
+ subunit_pass_test "$name"
else
- echo "failure: $name"
+ echo "$output" | subunit_fail_test "$name"
fi
return $status
}
@@ -26,13 +26,13 @@ test_smbclient_expect_failure() {
shift
shift
shift
- echo "test: $name"
- $VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@
+ subunit_start_test "$name"
+ output=`$VALGRIND $smbclient $CONFIGURATION "$unc" -c "$cmd" $@ 2>&1`
status=$?
if [ x$status = x0 ]; then
- echo "failure: $name"
+ echo "$output" | subunit_fail_test "$name"
else
- echo "success: $name"
+ subunit_pass_test "$name"
fi
return $status
}