File: testlib.pm

package info (click to toggle)
obs-build 20180831-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,396 kB
  • sloc: perl: 10,030; sh: 3,142; ansic: 284; makefile: 151; python: 35
file content (26 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

use Build;

sub expand {
  my ($c, @r) = Build::expand(@_);
  return ($c, sort(@r));
}

sub setuptest {
  my ($repo, $conf) = @_;
  my $l = '';
  my $id = '';
  for (split("\n", $repo)) {
    $id = "$1.noarch-0/0/0:" if /^P: (\S+)/;
    s/:/:$id/;
    $l .= "$_\n";
  }
  local *F;
  open(F, '<', \$l);
  my $config = Build::read_config('noarch', [ split("\n", $conf || '') ]);
  Build::readdeps($config, undef, \*F);
  close F;
  return $config;
}

1;