line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Hub::Subtest; |
2
|
54
|
|
|
54
|
|
479
|
use strict; |
|
54
|
|
|
|
|
49
|
|
|
54
|
|
|
|
|
1180
|
|
3
|
54
|
|
|
54
|
|
153
|
use warnings; |
|
54
|
|
|
|
|
41
|
|
|
54
|
|
|
|
|
2079
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000042'; |
6
|
|
|
|
|
|
|
|
7
|
54
|
|
|
54
|
|
168
|
use base 'Test2::Hub'; |
|
54
|
|
|
|
|
49
|
|
|
54
|
|
|
|
|
3381
|
|
8
|
54
|
|
|
54
|
|
212
|
use Test2::Util::HashBase qw/nested bailed_out exit_code manual_skip_all id/; |
|
54
|
|
|
|
|
71
|
|
|
54
|
|
|
|
|
267
|
|
9
|
54
|
|
|
54
|
|
195
|
use Test2::Util qw/get_tid/; |
|
54
|
|
|
|
|
50
|
|
|
54
|
|
|
|
|
9958
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $ID = 1; |
12
|
|
|
|
|
|
|
sub init { |
13
|
41
|
|
|
41
|
0
|
30
|
my $self = shift; |
14
|
41
|
|
|
|
|
118
|
$self->SUPER::init(@_); |
15
|
41
|
|
33
|
|
|
193
|
$self->{+ID} ||= join "-", $$, get_tid, $ID++; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub process { |
19
|
197
|
|
|
197
|
1
|
139
|
my $self = shift; |
20
|
197
|
|
|
|
|
184
|
my ($e) = @_; |
21
|
197
|
|
|
|
|
377
|
$e->set_nested($self->nested); |
22
|
197
|
|
|
|
|
386
|
$e->set_in_subtest($self->{+ID}); |
23
|
197
|
100
|
|
|
|
680
|
$self->set_bailed_out($e) if $e->isa('Test2::Event::Bail'); |
24
|
197
|
|
|
|
|
363
|
$self->SUPER::process($e); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub send { |
28
|
195
|
|
|
195
|
1
|
173
|
my $self = shift; |
29
|
195
|
|
|
|
|
166
|
my ($e) = @_; |
30
|
|
|
|
|
|
|
|
31
|
195
|
|
|
|
|
476
|
my $out = $self->SUPER::send($e); |
32
|
|
|
|
|
|
|
|
33
|
194
|
100
|
|
|
|
315
|
return $out if $self->{+MANUAL_SKIP_ALL}; |
34
|
193
|
50
|
66
|
|
|
712
|
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
|
54
|
|
|
54
|
|
202
|
no warnings 'exiting'; |
|
54
|
|
|
|
|
65
|
|
|
54
|
|
|
|
|
5177
|
|
39
|
0
|
|
|
|
|
0
|
last T2_SUBTEST_WRAPPER; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub terminate { |
43
|
4
|
|
|
4
|
0
|
10
|
my $self = shift; |
44
|
4
|
|
|
|
|
5
|
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
|
54
|
|
|
54
|
|
208
|
no warnings 'exiting'; |
|
54
|
|
|
|
|
46
|
|
|
54
|
|
|
|
|
2182
|
|
53
|
2
|
|
|
|
|
8
|
last T2_SUBTEST_WRAPPER; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
1; |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
__END__ |