aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-03 09:17:43 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-03 09:17:43 +0000
commite4edacf1184a40fb76d46e67501a35a2fcf117f5 (patch)
tree6cc4b84ab0eb2577c709c5f9e673504e5826caee /t
parent52f8e96232dbb7c7504a5a016a64d72421ffe76c (diff)
downloadperl-URPM-e4edacf1184a40fb76d46e67501a35a2fcf117f5.tar
perl-URPM-e4edacf1184a40fb76d46e67501a35a2fcf117f5.tar.gz
perl-URPM-e4edacf1184a40fb76d46e67501a35a2fcf117f5.tar.bz2
perl-URPM-e4edacf1184a40fb76d46e67501a35a2fcf117f5.tar.xz
perl-URPM-e4edacf1184a40fb76d46e67501a35a2fcf117f5.zip
Rebuild test rpm when running tests. Add cleanup to files.
Diffstat (limited to 't')
-rw-r--r--t/00prepare.t13
-rw-r--r--t/parse.t2
2 files changed, 14 insertions, 1 deletions
diff --git a/t/00prepare.t b/t/00prepare.t
new file mode 100644
index 0000000..d454c02
--- /dev/null
+++ b/t/00prepare.t
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+chdir 't' if -d 't';
+for (qw(BUILD RPMS RPMS/noarch)) {
+ mkdir $_;
+}
+# locally build a test rpm
+system(rpmbuild => '--define', '_topdir .', '-bb', '--clean', '../test-rpm.spec');
+ok( -f 'RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm', 'rpm created' );
diff --git a/t/parse.t b/t/parse.t
index 0b9618a..103f66a 100644
--- a/t/parse.t
+++ b/t/parse.t
@@ -14,7 +14,7 @@ ok($a);
END { unlink 'hdlist.cz' }
-my ($start, $end) = $a->parse_rpms_build_headers(rpms => [ "test-rpm-1.0-1mdk.noarch.rpm" ], keep_all_tags => 1);
+my ($start, $end) = $a->parse_rpms_build_headers(rpms => [ "t/RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm" ], keep_all_tags => 1);
ok(@{$a->{depslist}} == 1);
my $pkg = $a->{depslist}[0];
ok($pkg);