]> git.gsnw.org Git - fping.git/commitdiff
fix -m test
authorDavid Schweikert <david@schweikert.ch>
Tue, 31 Jan 2017 11:34:23 +0000 (12:34 +0100)
committerDavid Schweikert <david@schweikert.ch>
Fri, 3 Feb 2017 08:55:42 +0000 (09:55 +0100)
ci/test-14-ping-internet-hosts.pl

index 3c7aadb07aceaa2a2c2eca4ee2fc528d8547f85d..4677bf356d21ee2b8019eb858ac04f05c625b541 100755 (executable)
@@ -53,11 +53,14 @@ SKIP: {
 }
 
 # fping -m
-{
-my $cmd = Test::Command->new(cmd => "fping -m google-public-dns-a.google.com");
-$cmd->exit_is_num(0);
-$cmd->stdout_is_eq("google-public-dns-a.google.com is alive\n");
-$cmd->stderr_is_eq("");
+SKIP: {
+    if(system("/sbin/ifconfig | grep inet6.*Scope:Global") != 0) {
+        skip 'No IPv6 on this host', 3;
+    }
+    my $cmd = Test::Command->new(cmd => "fping -A -m google-public-dns-a.google.com");
+    $cmd->exit_is_num(0);
+    $cmd->stdout_is_eq("2001:4860:4860::8888 is alive\n8.8.8.8 is alive\n");
+    $cmd->stderr_is_eq("");
 }
 
 # fping -n