summaryrefslogtreecommitdiffstats
path: root/t/helper.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-01-15 02:33:20 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-04-09 17:50:35 +0200
commit6631840bc112151fb8bd588e20aee8742b1c42eb (patch)
tree00b1f5cd25dfe7dc9c2adc80ddc7c48371b7c43b /t/helper.pm
parentdf855def6d9c9c2a5820d85e06df9071e796a03d (diff)
downloadurpmi-6631840bc112151fb8bd588e20aee8742b1c42eb.tar
urpmi-6631840bc112151fb8bd588e20aee8742b1c42eb.tar.gz
urpmi-6631840bc112151fb8bd588e20aee8742b1c42eb.tar.bz2
urpmi-6631840bc112151fb8bd588e20aee8742b1c42eb.tar.xz
urpmi-6631840bc112151fb8bd588e20aee8742b1c42eb.zip
cpan_testers: skip weak deps test on CentOS 7 (unsupported)
rationale: CentOS 7's rpm doesn't support eg Recommendstag, it only knows their definitions but is unable to parse a spec file using Recommends Ideally we should be able to detect a too old/unpatched rpm... Technically, we could check whether it's Mageia < 6 which did have an non upstream implementation (but was using Suggests tag instead of Recommends and so would need testsuite adaption -- not worth it)
Diffstat (limited to 't/helper.pm')
-rw-r--r--t/helper.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/helper.pm b/t/helper.pm
index fb211359..ad0f152c 100644
--- a/t/helper.pm
+++ b/t/helper.pm
@@ -1,8 +1,11 @@
package helper;
use Test::More;
+use urpm::select;
+use urpm::util;
use base 'Exporter';
our @EXPORT = qw(need_root_and_prepare need_downloader
+ are_weak_deps_supported
start_httpd httpd_port
urpmi_addmedia urpmi_removemedia urpmi_update
urpm_cmd run_urpm_cmd urpmi_cmd urpmi urpmi_partial test_urpmi_fail urpme
@@ -173,6 +176,9 @@ sub check_installed_and_urpme {
check_nothing_installed();
}
+sub are_weak_deps_supported() {
+ return urpm::select::_rpm_version() gt 4.12.0
+}
END {
$using_root and system('rm -rf root');