line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Hub::Subtest; |
2
|
57
|
|
|
57
|
|
628
|
use strict; |
|
57
|
|
|
|
|
53
|
|
|
57
|
|
|
|
|
1296
|
|
3
|
57
|
|
|
57
|
|
164
|
use warnings; |
|
57
|
|
|
|
|
41
|
|
|
57
|
|
|
|
|
1942
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000044'; |
6
|
|
|
|
|
|
|
|
7
|
57
|
|
|
57
|
|
190
|
use base 'Test2::Hub'; |
|
57
|
|
|
|
|
55
|
|
|
57
|
|
|
|
|
4045
|
|
8
|
57
|
|
|
57
|
|
209
|
use Test2::Util::HashBase qw/nested bailed_out exit_code manual_skip_all id/; |
|
57
|
|
|
|
|
55
|
|
|
57
|
|
|
|
|
274
|
|
9
|
57
|
|
|
57
|
|
364
|
use Test2::Util qw/get_tid/; |
|
57
|
|
|
|
|
62
|
|
|
57
|
|
|
|
|
10888
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $ID = 1; |
12
|
|
|
|
|
|
|
sub init { |
13
|
42
|
|
|
42
|
0
|
34
|
my $self = shift; |
14
|
42
|
|
|
|
|
136
|
$self->SUPER::init(@_); |
15
|
42
|
|
33
|
|
|
209
|
$self->{+ID} ||= join "-", $$, get_tid, $ID++; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub process { |
19
|
200
|
|
|
200
|
1
|
152
|
my $self = shift; |
20
|
200
|
|
|
|
|
151
|
my ($e) = @_; |
21
|
200
|
|
|
|
|
373
|
$e->set_nested($self->nested); |
22
|
200
|
|
|
|
|
421
|
$e->set_in_subtest($self->{+ID}); |
23
|
200
|
100
|
|
|
|
706
|
$self->set_bailed_out($e) if $e->isa('Test2::Event::Bail'); |
24
|
200
|
|
|
|
|
433
|
$self->SUPER::process($e); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub send { |
28
|
198
|
|
|
198
|
1
|
166
|
my $self = shift; |
29
|
198
|
|
|
|
|
201
|
my ($e) = @_; |
30
|
|
|
|
|
|
|
|
31
|
198
|
|
|
|
|
506
|
my $out = $self->SUPER::send($e); |
32
|
|
|
|
|
|
|
|
33
|
197
|
100
|
|
|
|
312
|
return $out if $self->{+MANUAL_SKIP_ALL}; |
34
|
196
|
50
|
66
|
|
|
764
|
return $out unless $e->isa('Test2::Event::Plan') |
|
|
|
0
|
|
|
|
|
|
|
|
33
|
|
|
|
|
35
|
|
|
|
|
|
|
&& $e->directive eq 'SKIP' |
36
|
|
|
|
|
|
|
&& ($e->trace->pid != $self->pid || $e->trace->tid != $self->tid); |
37
|
|
|
|
|
|
|
|
38
|
57
|
|
|
57
|
|
248
|
no warnings 'exiting'; |
|
57
|
|
|
|
|
67
|
|
|
57
|
|
|
|
|
5553
|
|
39
|
0
|
|
|
|
|
0
|
last T2_SUBTEST_WRAPPER; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub terminate { |
43
|
4
|
|
|
4
|
0
|
12
|
my $self = shift; |
44
|
4
|
|
|
|
|
3
|
my ($code, $e) = @_; |
45
|
4
|
|
|
|
|
7
|
$self->set_exit_code($code); |
46
|
|
|
|
|
|
|
|
47
|
4
|
100
|
|
|
|
8
|
return if $self->{+MANUAL_SKIP_ALL}; |
48
|
2
|
50
|
33
|
|
|
10
|
return if $e->isa('Test2::Event::Plan') |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
49
|
|
|
|
|
|
|
&& $e->directive eq 'SKIP' |
50
|
|
|
|
|
|
|
&& ($e->trace->pid != $$ || $e->trace->tid != get_tid); |
51
|
|
|
|
|
|
|
|
52
|
57
|
|
|
57
|
|
222
|
no warnings 'exiting'; |
|
57
|
|
|
|
|
55
|
|
|
57
|
|
|
|
|
2444
|
|
53
|
2
|
|
|
|
|
6
|
last T2_SUBTEST_WRAPPER; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |