summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-30 10:25:00 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-05-01 00:35:11 +0200
commit9d211a8652526a08cda05b50f6b4b0e764ba64ad (patch)
tree185ab0211c493725d0981e06b2c82e3d60c8489a
parent04c9b1adee16b12d60cbd98bfe132ce31e5a45d0 (diff)
downloadurpmi-9d211a8652526a08cda05b50f6b4b0e764ba64ad.tar
urpmi-9d211a8652526a08cda05b50f6b4b0e764ba64ad.tar.gz
urpmi-9d211a8652526a08cda05b50f6b4b0e764ba64ad.tar.bz2
urpmi-9d211a8652526a08cda05b50f6b4b0e764ba64ad.tar.xz
urpmi-9d211a8652526a08cda05b50f6b4b0e764ba64ad.zip
factorize a test
It's more readable and will help next commit
-rw-r--r--t/02create_pkgs.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/02create_pkgs.t b/t/02create_pkgs.t
index d6d48b71..d052f5b3 100644
--- a/t/02create_pkgs.t
+++ b/t/02create_pkgs.t
@@ -9,6 +9,8 @@ use Cwd;
set_path();
+my $is_bsd = $Config{archname} =~ /bsd/;
+
warn ">> RPM version is: ", `LC_ALL=C rpm --version`, "\n";
chdir 't' if -d 't';
@@ -43,8 +45,8 @@ foreach my $dir (grep { -d $_ } glob("data/SPECS/*")) {
}
foreach my $spec (glob("data/SPECS/*.spec")) {
- warn "SKIPPING /rpm-query-in-scriptlet/" if $spec =~ /rpm-query-in-scriptlet/ && $Config{archname} =~ /bsd/;
- next if $spec =~ /rpm-query-in-scriptlet/ && $Config{archname} =~ /bsd/;
+ warn "SKIPPING /rpm-query-in-scriptlet/" if $spec =~ /rpm-query-in-scriptlet/ && $is_bsd;
+ next if $spec =~ /rpm-query-in-scriptlet/ && $is_bsd;
my $name = rpmbuild($spec);
if ($name eq 'various') {