summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-10 18:03:12 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-04-28 20:58:59 +0200
commitb23808f26cac2456cc0c459314130adabfe90e6e (patch)
treeaedef6d34f2cac74012327c5d61f4b4fa9b3ed0c
parent080526f4e4dc713d95494744344dac37aaf69b0e (diff)
downloadurpmi-b23808f26cac2456cc0c459314130adabfe90e6e.tar
urpmi-b23808f26cac2456cc0c459314130adabfe90e6e.tar.gz
urpmi-b23808f26cac2456cc0c459314130adabfe90e6e.tar.bz2
urpmi-b23808f26cac2456cc0c459314130adabfe90e6e.tar.xz
urpmi-b23808f26cac2456cc0c459314130adabfe90e6e.zip
introduce is_mageia()
-rw-r--r--t/helper.pm6
-rw-r--r--t/superuser--mirrorlist.t2
2 files changed, 6 insertions, 2 deletions
diff --git a/t/helper.pm b/t/helper.pm
index d9a5b7e7..947cdeaa 100644
--- a/t/helper.pm
+++ b/t/helper.pm
@@ -5,7 +5,7 @@ use urpm::select;
use urpm::util;
use base 'Exporter';
our @EXPORT = qw(need_root_and_prepare need_downloader
- are_weak_deps_supported
+ are_weak_deps_supported is_mageia
start_httpd httpd_port
urpmi_addmedia urpmi_removemedia urpmi_update
urpm_cmd run_urpm_cmd urpmi_cmd urpmi urpmi_partial test_urpmi_fail urpme
@@ -176,6 +176,10 @@ sub check_installed_and_urpme {
check_nothing_installed();
}
+sub is_mageia() {
+ return -e '/etc/mageia-release';
+}
+
sub are_weak_deps_supported() {
return urpm::select::_rpm_version() gt 4.12.0;
}
diff --git a/t/superuser--mirrorlist.t b/t/superuser--mirrorlist.t
index 26cbc3fd..8a38d11b 100644
--- a/t/superuser--mirrorlist.t
+++ b/t/superuser--mirrorlist.t
@@ -7,7 +7,7 @@ use Test::More;
# Must be done before 'use urpm::cfg' else we got:
# '1..0 # SKIP Needs a Mageia specific patch that introduces Time::ZoneInfo->current_zone()'
BEGIN {
- if (-e '/etc/mageia-release') {
+ if (is_mageia()) {
plan 'no_plan';
} else {
plan skip_all => "Needs a Mageia specific patch that introduces Time::ZoneInfo->current_zone()";