From 360f05b8db2029cb62c11f7eddb7fb57f3b774f1 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 19 Sep 2018 12:10:00 +0200 Subject: skip network tests if we don't have a downloader --- t/superuser--mirrorlist.t | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/t/superuser--mirrorlist.t b/t/superuser--mirrorlist.t index d29974d1..0a0d877a 100644 --- a/t/superuser--mirrorlist.t +++ b/t/superuser--mirrorlist.t @@ -5,6 +5,17 @@ use lib '.', 't'; use helper; use Test::More 'no_plan'; BEGIN { use_ok 'urpm::cfg' } +my @dl_helpers = qw(wget curl prozilla aria2c); +my $found; +foreach (@dl_helpers) { + -e "/bin/$_" and $found = 1; +} +if (!$found) { + warn "SKIPing because we're missing a downloader. We need one of wget∕curl/prozilla/aria2c"; + #plan skip_all => "*BSD fails those"; + exit 0; +} + need_root_and_prepare(); -- cgit v1.2.1