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

use strict;
use warnings;
use Test::More tests => 1;
use Cwd;

@tmpdirs = qw(BUILD SOURCES RPMS RPMS/noarch tmp);

chdir 't' if -d 't';
mkdir $_ foreach @tmpdirs;

# 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' );

END { system('rm', '-rf', @tmpdirs) };