From 7b122f13dbb0bd714b47e1181ba36bfbb3bd7658 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Sat, 14 Sep 2013 19:36:20 +0200 Subject: tests: move ipv6 detection into NPTest module --- plugins/t/check_tcp.t | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'plugins/t/check_tcp.t') diff --git a/plugins/t/check_tcp.t b/plugins/t/check_tcp.t index 0e6a9641..abb16aec 100644 --- a/plugins/t/check_tcp.t +++ b/plugins/t/check_tcp.t @@ -6,19 +6,13 @@ use strict; use Test; -use NPTest; -use vars qw($tests); -my $has_ipv6; +use vars qw($tests $has_ipv6); BEGIN { - $tests = 11; - # do we have ipv6 - `ping6 -c 1 2a02:2e0:3fe:100::7 2>&1`; - if($? == 0) { - $has_ipv6 = 1; - $tests += 3; - } - plan tests => $tests; + use NPTest; + $has_ipv6 = NPTest::has_ipv6(); + $tests = $has_ipv6 ? 14 : 11; + plan tests => $tests; } -- cgit v1.2.3-74-g34f1