line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Rex::Test::Spec::run; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
222
|
use Rex -base; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
|
|
|
|
|
|
my $that = shift; |
10
|
|
|
|
|
|
|
my $proto = ref($that) || $that; |
11
|
|
|
|
|
|
|
my $self = {@_}; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
bless( $self, $proto ); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
my ( $pkg, $file ) = caller(0); |
16
|
|
|
|
|
|
|
$self->doit; |
17
|
|
|
|
|
|
|
return $self; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub doit { |
21
|
|
|
|
|
|
|
my ( $self ) = @_; |
22
|
|
|
|
|
|
|
run($self->{name}, sub{ |
23
|
|
|
|
|
|
|
($self->{stdout}, $self->{stderr}) = @_; |
24
|
|
|
|
|
|
|
}); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub getvalue { |
28
|
|
|
|
|
|
|
my ( $self, $key ) = @_; |
29
|
|
|
|
|
|
|
return $self->{$key}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |