diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2014-12-14 20:28:25 +0000 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2015-03-06 04:41:48 +0100 |
| commit | da04eb9c3aced4ec62c6cda54061a303d608c016 (patch) | |
| tree | 5c98e4a5214a0c889990c6ee64d857e83b4626da /lib/subunit/shell/tests | |
| parent | e59f2602f1f89f9d2a9b15a614ab0d86da5adc4e (diff) | |
| download | samba-da04eb9c3aced4ec62c6cda54061a303d608c016.tar.gz samba-da04eb9c3aced4ec62c6cda54061a303d608c016.tar.xz samba-da04eb9c3aced4ec62c6cda54061a303d608c016.zip | |
Remove bundled subunit.
Change-Id: I18e19c3817de6f97fe2a9fb1b7faa4f8a0d27649
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib/subunit/shell/tests')
| -rwxr-xr-x | lib/subunit/shell/tests/test_function_output.sh | 97 | ||||
| -rwxr-xr-x | lib/subunit/shell/tests/test_source_library.sh | 108 |
2 files changed, 0 insertions, 205 deletions
diff --git a/lib/subunit/shell/tests/test_function_output.sh b/lib/subunit/shell/tests/test_function_output.sh deleted file mode 100755 index 00b0844dda..0000000000 --- a/lib/subunit/shell/tests/test_function_output.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -# subunit shell bindings. -# Copyright (C) 2006 Robert Collins <robertc@robertcollins.net> -# -# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause -# license at the users choice. A copy of both licenses are available in the -# project source as Apache-2.0 and BSD. You may not use this file except in -# compliance with one of these two licences. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# license you chose for the specific language governing permissions and -# limitations under that license. -# - - -# this script tests the output of the methods. As each is tested we start using -# it. -# So the first test manually implements the entire protocol, the next uses the -# start method and so on. -# it is assumed that we are running from the 'shell' tree root in the source -# of subunit, and that the library sourcing tests have all passed - if they -# have not, this test script may well fail strangely. - -# import the library. -. ${SHELL_SHARE}subunit.sh - -echo 'test: subunit_start_test output' -func_output=$(subunit_start_test "foo bar"|grep -v 'time:') -func_status=$? -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 [' - echo 'got an error code or incorrect output:' - echo "exit: $func_status" - echo "output: '$func_output'" - echo ']' ; -fi - -subunit_start_test "subunit_pass_test output" -func_output=$(subunit_pass_test "foo bar"|grep -v 'time:') -func_status=$? -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 [' - echo 'got an error code or incorrect output:' - echo "exit: $func_status" - echo "output: '$func_output'" - echo ']' ; -fi - -subunit_start_test "subunit_fail_test output" -func_output=$((subunit_fail_test "foo bar" <<END -something - wrong -here -END -)|grep -v 'time:') -func_status=$? -if [ $func_status == 0 -a "x$func_output" = "xfailure: foo bar [ -something - wrong -here -]" ]; then - subunit_pass_test "subunit_fail_test output" -else - echo 'failure: subunit_fail_test output [' - echo 'got an error code or incorrect output:' - echo "exit: $func_status" - echo "output: '$func_output'" - echo ']' ; -fi - -subunit_start_test "subunit_error_test output" -func_output=$((subunit_error_test "foo bar" <<END -something - died -here -END -)| grep -v 'time:') -func_status=$? -if [ $func_status == 0 -a "x$func_output" = "xerror: foo bar [ -something - died -here -]" ]; then - subunit_pass_test "subunit_error_test output" -else - subunit_fail_test "subunit_error_test output" <<END -got an error code or incorrect output: -exit: $func_status -output: '$func_output' -END -fi diff --git a/lib/subunit/shell/tests/test_source_library.sh b/lib/subunit/shell/tests/test_source_library.sh deleted file mode 100755 index 699f1281bc..0000000000 --- a/lib/subunit/shell/tests/test_source_library.sh +++ /dev/null @@ -1,108 +0,0 @@ -#!/bin/bash -# subunit shell bindings. -# Copyright (C) 2006 Robert Collins <robertc@robertcollins.net> -# -# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause -# license at the users choice. A copy of both licenses are available in the -# project source as Apache-2.0 and BSD. You may not use this file except in -# compliance with one of these two licences. -# -# Unless required by applicable law or agreed to in writing, software -# distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# license you chose for the specific language governing permissions and -# limitations under that license. -# - - -# this script tests that we can source the subunit shell bindings successfully. -# It manually implements the control protocol so that it des not depend on the -# bindings being complete yet. - -# we expect to be run from the tree root. - -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 [ $? == 0 -a "x$source_output" = "x" ]; then - echo 'success: shell bindings can be sourced' -else - echo 'failure: shell bindings can be sourced [' - echo 'got an error code or output during sourcing.:' - echo $source_output - echo ']' ; -fi - -# now source it for real -. ${SHELL_SHARE}subunit.sh - -# we should have a start_test function -echo 'test: subunit_start_test exists' -found_type=$(type -t subunit_start_test) -status=$? -if [ $status == 0 -a "x$found_type" = "xfunction" ]; then - echo 'success: subunit_start_test exists' -else - echo 'failure: subunit_start_test exists [' - echo 'subunit_start_test is not a function:' - echo "type -t status: $status" - echo "output: $found_type" - echo ']' ; -fi - -# we should have a pass_test function -echo 'test: subunit_pass_test exists' -found_type=$(type -t subunit_pass_test) -status=$? -if [ $status == 0 -a "x$found_type" = "xfunction" ]; then - echo 'success: subunit_pass_test exists' -else - echo 'failure: subunit_pass_test exists [' - echo 'subunit_pass_test is not a function:' - echo "type -t status: $status" - echo "output: $found_type" - echo ']' ; -fi - -# we should have a fail_test function -echo 'test: subunit_fail_test exists' -found_type=$(type -t subunit_fail_test) -status=$? -if [ $status == 0 -a "x$found_type" = "xfunction" ]; then - echo 'success: subunit_fail_test exists' -else - echo 'failure: subunit_fail_test exists [' - echo 'subunit_fail_test is not a function:' - echo "type -t status: $status" - echo "output: $found_type" - echo ']' ; -fi - -# we should have a error_test function -echo 'test: subunit_error_test exists' -found_type=$(type -t subunit_error_test) -status=$? -if [ $status == 0 -a "x$found_type" = "xfunction" ]; then - echo 'success: subunit_error_test exists' -else - echo 'failure: subunit_error_test exists [' - echo 'subunit_error_test is not a function:' - echo "type -t status: $status" - echo "output: $found_type" - echo ']' ; -fi - -# we should have a skip_test function -echo 'test: subunit_skip_test exists' -found_type=$(type -t subunit_skip_test) -status=$? -if [ $status == 0 -a "x$found_type" = "xfunction" ]; then - echo 'success: subunit_skip_test exists' -else - echo 'failure: subunit_skip_test exists [' - echo 'subunit_skip_test is not a function:' - echo "type -t status: $status" - echo "output: $found_type" - echo ']' ; -fi - |
