try to fix tests on travis-ci (no ipv6?)

pull/102/head
David Schweikert 8 years ago
parent 2e316571bd
commit 093ca16719

@ -60,7 +60,7 @@ $cmd7->stderr_is_eq("fping: specify only one of c, l\n");
my $cmd8 = Test::Command->new(cmd => "fping -b 65509 127.0.0.1");
$cmd8->exit_is_num(1);
$cmd8->stdout_is_eq("");
$cmd8->stderr_is_eq("fping: data size 65509 not valid, must be between 0 and 65508\n");
$cmd8->stderr_is_eq("fping: data size 65509 not valid, must be lower than 65508\n");
# fping -B 0.9
my $cmd9 = Test::Command->new(cmd => "fping -B 0.9 127.0.0.1");

@ -1,6 +1,7 @@
#!/usr/bin/perl -w
use Test::Command tests => 18;
use Test::More;
# -R random bytes
# -r n number of retries (default 3)
@ -17,12 +18,14 @@ $cmd->stdout_is_eq("");
$cmd->stderr_like(qr{127\.0\.0\.1 : xmt/rcv/%loss = 3/3/0%.*});
}
# fping6 -R
{
my $cmd = Test::Command->new(cmd => "fping6 -q -R -c3 -p100 ::1");
$cmd->exit_is_num(0);
$cmd->stdout_is_eq("");
$cmd->stderr_like(qr{::1 : xmt/rcv/%loss = 3/3/0%.*});
SKIP: {
if(system("/sbin/ifconfig | grep inet6") != 0) {
skip 'No IPv6 on this host', 3;
}
my $cmd = Test::Command->new(cmd => "fping6 -q -R -c3 -p100 ::1");
$cmd->exit_is_num(0);
$cmd->stdout_is_eq("");
$cmd->stderr_like(qr{::1 : xmt/rcv/%loss = 3/3/0%.*});
}
# fping -r tested in test-4-options-a-b.pl
@ -82,11 +85,14 @@ $cmd->stderr_is_eq("");
}
# fping6 -S
{
my $cmd = Test::Command->new(cmd => "fping6 -S ::1 ::1");
$cmd->exit_is_num(0);
$cmd->stdout_is_eq("::1 is alive\n");
$cmd->stderr_is_eq("");
SKIP: {
if(system("/sbin/ifconfig | grep inet6") != 0) {
skip 'No IPv6 on this host', 3;
}
my $cmd = Test::Command->new(cmd => "fping6 -S ::1 ::1");
$cmd->exit_is_num(0);
$cmd->stdout_is_eq("::1 is alive\n");
$cmd->stderr_is_eq("");
}
# fping -t tested in test-4-options-a-b.pl

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

Loading…
Cancel
Save