]> git.gsnw.org Git - fping.git/commitdiff
try to fix tests on travis-ci (no ipv6?)
authorDavid Schweikert <david@schweikert.ch>
Wed, 24 Aug 2016 11:33:32 +0000 (13:33 +0200)
committerDavid Schweikert <david@schweikert.ch>
Wed, 24 Aug 2016 11:33:32 +0000 (13:33 +0200)
ci/test-01-basics.pl

index 5b2ae1de00b85cd05d58eb4fea7b4cfc1775dabb..d53587ef4d054a530ce4f53095db4a066e37e647 100755 (executable)
@@ -12,10 +12,10 @@ use Test::More;
 }
 
 # ping ::1
-if(system("/sbin/ifconfig | grep inet6") != 0) {
-    skip 'No IPv6 on this host', 3;
-}
-else {
+SKIP: {
+    if(system("/sbin/ifconfig | grep inet6") != 0) {
+        skip 'No IPv6 on this host', 3;
+    }
     my $cmd = Test::Command->new(cmd => "fping6 ::1");
     $cmd->exit_is_num(0);
     $cmd->stdout_is_eq("::1 is alive\n");
@@ -27,8 +27,8 @@ else {
     my $cmd = Test::Command->new(cmd => "fping -p 100 -C3 127.0.0.1");
     $cmd->exit_is_num(0);
     $cmd->stdout_like(qr{127\.0\.0\.1 : \[0\], 84 bytes, 0\.\d+ ms \(0\.\d+ avg, 0% loss\)
-    127\.0\.0\.1 : \[1\], 84 bytes, 0\.\d+ ms \(0.\d+ avg, 0% loss\)
-    127\.0\.0\.1 : \[2\], 84 bytes, 0\.\d+ ms \(0.\d+ avg, 0% loss\)
-    });
+127\.0\.0\.1 : \[1\], 84 bytes, 0\.\d+ ms \(0.\d+ avg, 0% loss\)
+127\.0\.0\.1 : \[2\], 84 bytes, 0\.\d+ ms \(0.\d+ avg, 0% loss\)
+});
     $cmd->stderr_like(qr{127\.0\.0\.1 : 0\.\d+ 0\.\d+ 0\.\d+\n});
 }