aboutsummaryrefslogtreecommitdiffstats
path: root/t/00prepare.t
blob: f8dc8200b8babcfdc8cce7556db9fbbeda6ec21b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl

use strict;
use warnings;
use Test::More tests => 2;
use URPM;
use Cwd;

chdir 't' if -d 't';
mkdir "tmp";
for (qw(BUILD SOURCES SRPMS RPMS RPMS/noarch)) {
    mkdir "tmp/".$_;
}
# locally build a test rpm
system(rpmbuild => '--define', '_topdir '. Cwd::cwd() . "/tmp/", '-ba', 'test-rpm.spec');
ok( -f 'tmp/RPMS/noarch/test-rpm-1.0-1mdk.noarch.rpm', 'rpm created' );
ok( -f 'tmp/SRPMS/test-rpm-1.0-1mdk.src.rpm', 'srpm created' );