From f2dd4ca7eedaa9a1a905b4d8ef9217ccf304faf0 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Fri, 25 May 2018 18:37:50 +0200 Subject: tests: check if internet connection available before testing ping with firejail --- test/sysutils/ping.exp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') 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 spawn $env(SHELL) match_max 100000 +send -- "ping -c 3 yahoo.com\r" +expect { + timeout {puts "TESTING SKIP: no internet connection\n";exit} + "3 packets transmitted, 3 received" +} +after 100 + send -- "firejail ping -c 3 yahoo.com\r" expect { timeout {puts "TESTING ERROR 1\n";exit} -- cgit v1.2.3-54-g00ecf