aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--t/00prepare.t10
-rw-r--r--t/parse.t6
2 files changed, 8 insertions, 8 deletions
diff --git a/t/00prepare.t b/t/00prepare.t
index 25b5c37..7ea2704 100644
--- a/t/00prepare.t
+++ b/t/00prepare.t
@@ -6,11 +6,11 @@ use Test::More tests => 1;
use Cwd;
chdir 't' if -d 't';
-for (qw(BUILD SOURCES RPMS RPMS/noarch tmp)) {
- mkdir $_;
+mkdir "tmp";
+for (qw(BUILD SOURCES RPMS RPMS/noarch)) {
+ mkdir "tmp/".$_;
}
# locally build a test rpm
-system(rpmbuild => '--define', '_topdir ' . Cwd::cwd(), '--define', '_tmppath ' . Cwd::cwd() . '/tmp/', '-bb', 'test-rpm.spec');
-ok( -f 'RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm', 'rpm created' );
+system(rpmbuild => '--define', '_topdir '. Cwd::cwd() . "/tmp/", '-bb', 'test-rpm.spec');
+ok( -f 'tmp/RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm', 'rpm created' );
-END { system('rm -rf BUILD tmp') };
diff --git a/t/parse.t b/t/parse.t
index b85bac5..cc9d3ba 100644
--- a/t/parse.t
+++ b/t/parse.t
@@ -18,9 +18,9 @@ URPM::setVerbosity(2);
my $a = new URPM;
ok($a);
-END { system('rm -rf hdlist.cz empty_hdlist.cz headers') }
+END { system('rm -rf hdlist.cz empty_hdlist.cz headers tmp') }
-my ($start, $end) = $a->parse_rpms_build_headers(rpms => [ "RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm" ], keep_all_tags => 1);
+my ($start, $end) = $a->parse_rpms_build_headers(rpms => [ "tmp/RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm" ], keep_all_tags => 1);
ok(@{$a->{depslist}} == 1);
my $pkg = $a->{depslist}[0];
ok($pkg);
@@ -69,7 +69,7 @@ rpm_is_jbj_version() ?
ok($pkg->is_platform_compat() > 0, "can evaluate platform score") :
pass('no platform compat');
-my $headers = eval { [ $b->parse_rpms_build_headers(rpms => [ "RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm" ],
+my $headers = eval { [ $b->parse_rpms_build_headers(rpms => [ "tmp/RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm" ],
dir => 'headers') ] };
is($@, '', 'parse_rpms_build_headers');
is(int @$headers, 1, 'parse_rpms_build_headers');