summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-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()";