diff options
author | Reiner Herrmann <reiner@reiner-h.de> | 2018-05-25 18:37:50 +0200 |
---|---|---|
committer | Reiner Herrmann <reiner@reiner-h.de> | 2018-05-25 20:17:39 +0200 |
commit | f2dd4ca7eedaa9a1a905b4d8ef9217ccf304faf0 (patch) | |
tree | ce75c47dfb349e08c2e450a29270e283073afb80 /test | |
parent | Fix travis (diff) | |
download | firejail-f2dd4ca7eedaa9a1a905b4d8ef9217ccf304faf0.tar.gz firejail-f2dd4ca7eedaa9a1a905b4d8ef9217ccf304faf0.tar.zst firejail-f2dd4ca7eedaa9a1a905b4d8ef9217ccf304faf0.zip |
tests: check if internet connection available before testing ping with firejail
Diffstat (limited to 'test')
-rwxr-xr-x | test/sysutils/ping.exp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sysutils/ping.exp b/test/sysutils/ping.exp index d10cd2b66..a362a516e 100755 --- a/test/sysutils/ping.exp +++ b/test/sysutils/ping.exp | |||
@@ -7,6 +7,13 @@ set timeout 10 | |||
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "ping -c 3 yahoo.com\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING SKIP: no internet connection\n";exit} | ||
13 | "3 packets transmitted, 3 received" | ||
14 | } | ||
15 | after 100 | ||
16 | |||
10 | send -- "firejail ping -c 3 yahoo.com\r" | 17 | send -- "firejail ping -c 3 yahoo.com\r" |
11 | expect { | 18 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 19 | timeout {puts "TESTING ERROR 1\n";exit} |