[PATCH 7/8] samba3dump: Add subunit-enabled test for samba3dump.

Matthieu Patou mat at samba.org
Thu Oct 16 00:12:52 MDT 2014


On Sun, Oct 12, 2014 at 09:19:03PM -0700, Jelmer Vernooij wrote:
> Change-Id: Ie9682c715fc91d923dcd1951236f8b36fa519327
> Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
> ---
>  source4/selftest/test_samba3dump.sh | 14 ++++++++++++++
>  source4/selftest/tests.py           |  2 +-
>  2 files changed, 15 insertions(+), 1 deletion(-)
>  create mode 100755 source4/selftest/test_samba3dump.sh
> 
> diff --git a/source4/selftest/test_samba3dump.sh b/source4/selftest/test_samba3dump.sh
> new file mode 100755
> index 0000000..4db142b
> --- /dev/null
> +++ b/source4/selftest/test_samba3dump.sh
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +# Verify that samba3dump completes.
> +
> +. lib/subunit/shell/share/subunit.sh
> +
> +subunit_start_test samba3dump
> +
> +SRCDIR=`dirname $0`/../..
> +
> +if $SRCDIR/source4/scripting/bin/samba3dump $SRCDIR/testdata/samba3; then
> +	subunit_pass_test samba3dump
> +else
> +	echo | subunit_fail_test samba3dump
> +fi
> diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
> index 60017f9..910fdbb 100755
> --- a/source4/selftest/tests.py
> +++ b/source4/selftest/tests.py
> @@ -489,7 +489,7 @@ planpythontestsuite("plugin_s4_dc:local", "samba.tests.posixacl")
>  plantestsuite("samba4.deletetest.python(dc)", "dc", ['PYTHONPATH="$PYTHONPATH:%s/lib/subunit/python:%s/lib/testtools"' % (srcdir(), srcdir()),
>                                                       python, os.path.join(samba4srcdir, "dsdb/tests/python/deletetest.py"),
>                                                       '$SERVER', '-U"$USERNAME%$PASSWORD"', '--workgroup=$DOMAIN'])
> -plantestsuite("samba4.blackbox.samba3dump", "none", [python, os.path.join(samba4srcdir, "scripting/bin/samba3dump"), os.path.join(samba4srcdir, "../testdata/samba3")], allow_empty_output=True)
> +plantestsuite("samba4.blackbox.samba3dump", "none", ['PYTHONPATH="$PYTHONPATH:%s/lib/subunit/python:%s/lib/testtools"' % (srcdir(), srcdir()), os.path.join(samba4srcdir, "selftest/test_samba3dump.sh")])
>  plantestsuite("samba4.blackbox.upgrade", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_s3upgrade.sh"), '$PREFIX/provision'])
>  plantestsuite("samba4.blackbox.provision.py", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_provision.sh"), '$PREFIX/provision'])
>  plantestsuite("samba4.blackbox.upgradeprovision.current", "none", ["PYTHON=%s" % python, os.path.join(samba4srcdir, "setup/tests/blackbox_upgradeprovision.sh"), '$PREFIX/provision'])
> -- 
> 2.1.1
> 
Reviewed-by: Matthieu Patou <mat at matws.net>

-- 
Matthieu Patou
Samba Team
http://samba.org


More information about the samba-technical mailing list