summaryrefslogtreecommitdiff
path: root/src/test/ssl/ServerSetup.pm
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-05-22 14:25:01 -0400
committerPeter Eisentraut <peter_e@gmx.net>2018-07-01 12:58:32 +0200
commitc4309f4aeeae54e4c5281d68e29288af1d0d1ed2 (patch)
tree706fa479aa19f3128ee71ef8c0884569204dd04a /src/test/ssl/ServerSetup.pm
parent65782346a4812482bfb09f9e1117c908146e67b5 (diff)
Use $Test::Builder::Level in TAP test functions
In TAP test functions, that is, those that produce test results, locally increment $Test::Builder::Level. This has the effect that test failures are reported at the callers location rather than somewhere in the test support libraries. Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>
Diffstat (limited to 'src/test/ssl/ServerSetup.pm')
-rw-r--r--src/test/ssl/ServerSetup.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/ssl/ServerSetup.pm b/src/test/ssl/ServerSetup.pm
index 5ffc0b5385d..3b451a360ad 100644
--- a/src/test/ssl/ServerSetup.pm
+++ b/src/test/ssl/ServerSetup.pm
@@ -38,6 +38,8 @@ our @EXPORT = qw(
# The second argument is a complementary connection string.
sub test_connect_ok
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my ($common_connstr, $connstr, $test_name) = @_;
my $cmd = [
@@ -52,6 +54,8 @@ sub test_connect_ok
sub test_connect_fails
{
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
my ($common_connstr, $connstr, $expected_stderr, $test_name) = @_;
my $cmd = [