summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2018-09-18 13:58:06 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2018-09-18 14:02:55 +0200
commit2dd92fa49e8cda370682e70ac3921ca12002feb1 (patch)
tree8f5ad0dea23d6c6678af50a076d1771dfe578d75
parenta6a4d3664cc5b804749ce1c41017b164894b9e77 (diff)
downloadperl-RPM4-2dd92fa49e8cda370682e70ac3921ca12002feb1.tar
perl-RPM4-2dd92fa49e8cda370682e70ac3921ca12002feb1.tar.gz
perl-RPM4-2dd92fa49e8cda370682e70ac3921ca12002feb1.tar.bz2
perl-RPM4-2dd92fa49e8cda370682e70ac3921ca12002feb1.tar.xz
perl-RPM4-2dd92fa49e8cda370682e70ac3921ca12002feb1.zip
rpmbuild is not functional on most *BSD & Debian
-rw-r--r--RPM4/t/04spec.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/RPM4/t/04spec.t b/RPM4/t/04spec.t
index e9b1499..7071df6 100644
--- a/RPM4/t/04spec.t
+++ b/RPM4/t/04spec.t
@@ -2,11 +2,14 @@
# $Id$
use strict;
-use Test::More tests => 27;
+use Test::More;
use FindBin qw($Bin);
use File::Temp qw(tempdir);
use RPM4;
+my $skip = -e '/etc/debian_version' || `uname -a` =~ /BSD/i;
+plan tests => ($skip ? 25 : 27);
+
my %info = RPM4::moduleinfo();
my $testdir = tempdir(CLEANUP => 1);
@@ -46,10 +49,10 @@ ok($h->queryformat("%{NAME}") eq "test-rpm", "can querying header give by spec")
ok($spec->build([ qw(PREP) ]) == 0, "simulate rpm -bp (check prep)");
ok($spec->build([ qw(BUILD) ]) == 0, "simulate rpm -bc");
-ok($spec->build([ qw(INSTALL CHECK) ]) == 0, "simulate rpm -bi");
+ok($spec->build([ qw(INSTALL CHECK) ]) == 0, "simulate rpm -bi") if !$skip;;
# else next test fails with rpm-4.14:
ok($spec = RPM4::Spec->new("$Bin/test-rpm.spec"), "ReLoading the spec file");
-ok($spec->build([ qw(FILECHECK) ]) == 0, "simulate rpm -bl");
+ok($spec->build([ qw(FILECHECK) ]) == 0, "simulate rpm -bl") if !$skip;
#ok($spec->build([ qw(PACKAGEBINARY CLEAN) ]) == 0, "simulate rpm -bb (binary, clean)");
ok($spec->build([ qw(PACKAGESOURCE) ]) == 0, "simulate rpm -bs");
#ok($spec->rpmbuild("bb") == 0, "testing spec->rpmbuild(-bb)");