From 9d211a8652526a08cda05b50f6b4b0e764ba64ad Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 30 Apr 2020 10:25:00 +0200 Subject: factorize a test It's more readable and will help next commit --- t/02create_pkgs.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 't') 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') { -- cgit v1.2.1