mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
subunit: Update to newer upstream snapshot.
This commit is contained in:
parent
297434055e
commit
91438920b4
@ -14,7 +14,7 @@ Dependencies
|
||||
* Python for the filters
|
||||
* 'testtools' (On Debian and Ubuntu systems the 'python-testtools' package,
|
||||
the testtools package on pypi, or https://launchpad.net/testtools) for
|
||||
the extended test API which permits attachments. Version 0.9.2 or newer is
|
||||
the extended test API which permits attachments. Version 0.9.8 or newer is
|
||||
required. Of particular note, http://testtools.python-hosting.com/ is not
|
||||
the testtools you want.
|
||||
* A C compiler for the C bindings
|
||||
@ -23,3 +23,10 @@ Dependencies
|
||||
* python-gtk2 if you wish to use subunit2gtk
|
||||
* python-junitxml if you wish to use subunit2junitxml
|
||||
* pkg-config for configure detection of supporting libraries.
|
||||
|
||||
Binary packages
|
||||
---------------
|
||||
|
||||
A number of distributions now include subunit, you can try via your package
|
||||
manager. The authors maintain a personal package archive on Launchpad::
|
||||
https://launchpad.net/~testing-cabal/+archive/archive
|
||||
|
@ -5,6 +5,19 @@ subunit release notes
|
||||
NEXT (In development)
|
||||
---------------------
|
||||
|
||||
The Subunit Python test runner ``python -m subunit.run`` can now report the
|
||||
test ids and also filter via a test id list file thanks to improvements in
|
||||
``testtools.run``. See the testtools manual, or testrepository - a major
|
||||
user of such functionality.
|
||||
|
||||
IMPROVEMENTS
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* The ``subunit.run`` Python module supports ``-l`` and ``--load-list`` as
|
||||
per ``testtools.run``. This required a dependency bump due to a small
|
||||
API change in ``testtools``. (Robert Collins)
|
||||
|
||||
|
||||
0.0.6
|
||||
-----
|
||||
|
||||
@ -48,6 +61,10 @@ IMPROVEMENTS
|
||||
non-details based test information; this should consistently UTF8 encode such
|
||||
strings.
|
||||
|
||||
* The Python TestProtocolClient now flushes output on startTest and stopTest.
|
||||
(Martin [gz]).
|
||||
|
||||
|
||||
0.0.5
|
||||
-----
|
||||
|
||||
|
@ -646,7 +646,13 @@ class TestProtocolClient(testresult.TestResult):
|
||||
|
||||
def startTest(self, test):
|
||||
"""Mark a test as starting its test run."""
|
||||
super(TestProtocolClient, self).startTest(test)
|
||||
self._stream.write("test: %s\n" % test.id())
|
||||
self._stream.flush()
|
||||
|
||||
def stopTest(self, test):
|
||||
super(TestProtocolClient, self).stopTest(test)
|
||||
self._stream.flush()
|
||||
|
||||
def progress(self, offset, whence):
|
||||
"""Provide indication about the progress/length of the test run.
|
||||
|
@ -69,4 +69,5 @@ class SubunitTestProgram(TestProgram):
|
||||
if __name__ == '__main__':
|
||||
stream = get_default_formatter()
|
||||
runner = SubunitTestRunner(stream)
|
||||
SubunitTestProgram(module=None, argv=sys.argv, testRunner=runner)
|
||||
SubunitTestProgram(module=None, argv=sys.argv, testRunner=runner,
|
||||
stdout=sys.stdout)
|
||||
|
@ -9,7 +9,7 @@ except ImportError:
|
||||
else:
|
||||
extra = {
|
||||
'install_requires': [
|
||||
'testtools',
|
||||
'testtools>=0.9.6',
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ a manually written test using the bindings might look like:
|
||||
subunit_start_test "test name"
|
||||
# determine if test passes or fails
|
||||
result=$(something)
|
||||
if [ $result -eq 0 ]; then
|
||||
if [ $result == 0 ]; then
|
||||
subunit_pass_test "test name"
|
||||
else
|
||||
subunit_fail_test "test name" <<END
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# subunit shell bindings.
|
||||
# Copyright (C) 2006 Robert Collins <robertc@robertcollins.net>
|
||||
#
|
||||
@ -29,7 +29,7 @@
|
||||
echo 'test: subunit_start_test output'
|
||||
func_output=$(subunit_start_test "foo bar")
|
||||
func_status=$?
|
||||
if [ $func_status -eq 0 -a "x$func_output" = "xtest: foo bar" ]; then
|
||||
if [ $func_status == 0 -a "x$func_output" = "xtest: foo bar" ]; then
|
||||
echo 'success: subunit_start_test output'
|
||||
else
|
||||
echo 'failure: subunit_start_test output ['
|
||||
@ -42,7 +42,7 @@ fi
|
||||
subunit_start_test "subunit_pass_test output"
|
||||
func_output=$(subunit_pass_test "foo bar")
|
||||
func_status=$?
|
||||
if [ $func_status -eq 0 -a "x$func_output" = "xsuccess: foo bar" ]; then
|
||||
if [ $func_status == 0 -a "x$func_output" = "xsuccess: foo bar" ]; then
|
||||
subunit_pass_test "subunit_pass_test output"
|
||||
else
|
||||
echo 'failure: subunit_pass_test output ['
|
||||
@ -60,7 +60,7 @@ here
|
||||
END
|
||||
)
|
||||
func_status=$?
|
||||
if [ $func_status -eq 0 -a "x$func_output" = "xfailure: foo bar [
|
||||
if [ $func_status == 0 -a "x$func_output" = "xfailure: foo bar [
|
||||
something
|
||||
wrong
|
||||
here
|
||||
@ -82,7 +82,7 @@ here
|
||||
END
|
||||
)
|
||||
func_status=$?
|
||||
if [ $func_status -eq 0 -a "x$func_output" = "xerror: foo bar [
|
||||
if [ $func_status == 0 -a "x$func_output" = "xerror: foo bar [
|
||||
something
|
||||
died
|
||||
here
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# subunit shell bindings.
|
||||
# Copyright (C) 2006 Robert Collins <robertc@robertcollins.net>
|
||||
#
|
||||
@ -24,7 +24,7 @@
|
||||
echo 'test: shell bindings can be sourced'
|
||||
# if any output occurs, this has failed to source cleanly
|
||||
source_output=$(. ${SHELL_SHARE}subunit.sh 2>&1)
|
||||
if [ $? -eq 0 -a "x$source_output" = "x" ]; then
|
||||
if [ $? == 0 -a "x$source_output" = "x" ]; then
|
||||
echo 'success: shell bindings can be sourced'
|
||||
else
|
||||
echo 'failure: shell bindings can be sourced ['
|
||||
@ -40,7 +40,7 @@ fi
|
||||
echo 'test: subunit_start_test exists'
|
||||
found_type=$(type -t subunit_start_test)
|
||||
status=$?
|
||||
if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
|
||||
if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
|
||||
echo 'success: subunit_start_test exists'
|
||||
else
|
||||
echo 'failure: subunit_start_test exists ['
|
||||
@ -54,7 +54,7 @@ fi
|
||||
echo 'test: subunit_pass_test exists'
|
||||
found_type=$(type -t subunit_pass_test)
|
||||
status=$?
|
||||
if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
|
||||
if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
|
||||
echo 'success: subunit_pass_test exists'
|
||||
else
|
||||
echo 'failure: subunit_pass_test exists ['
|
||||
@ -68,7 +68,7 @@ fi
|
||||
echo 'test: subunit_fail_test exists'
|
||||
found_type=$(type -t subunit_fail_test)
|
||||
status=$?
|
||||
if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
|
||||
if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
|
||||
echo 'success: subunit_fail_test exists'
|
||||
else
|
||||
echo 'failure: subunit_fail_test exists ['
|
||||
@ -82,7 +82,7 @@ fi
|
||||
echo 'test: subunit_error_test exists'
|
||||
found_type=$(type -t subunit_error_test)
|
||||
status=$?
|
||||
if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
|
||||
if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
|
||||
echo 'success: subunit_error_test exists'
|
||||
else
|
||||
echo 'failure: subunit_error_test exists ['
|
||||
@ -96,7 +96,7 @@ fi
|
||||
echo 'test: subunit_skip_test exists'
|
||||
found_type=$(type -t subunit_skip_test)
|
||||
status=$?
|
||||
if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
|
||||
if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
|
||||
echo 'success: subunit_skip_test exists'
|
||||
else
|
||||
echo 'failure: subunit_skip_test exists ['
|
||||
|
Loading…
x
Reference in New Issue
Block a user