line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Hub::Subtest; |
2
|
57
|
|
|
57
|
|
482
|
use strict; |
|
57
|
|
|
|
|
58
|
|
|
57
|
|
|
|
|
1267
|
|
3
|
57
|
|
|
57
|
|
159
|
use warnings; |
|
57
|
|
|
|
|
53
|
|
|
57
|
|
|
|
|
2354
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.000043'; |
6
|
|
|
|
|
|
|
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) |
7
|
|
|
|
|
|
|
|
8
|
57
|
|
|
57
|
|
179
|
use base 'Test2::Hub'; |
|
57
|
|
|
|
|
59
|
|
|
57
|
|
|
|
|
3876
|
|
9
|
57
|
|
|
57
|
|
212
|
use Test2::Util::HashBase qw/nested bailed_out exit_code manual_skip_all id/; |
|
57
|
|
|
|
|
83
|
|
|
57
|
|
|
|
|
273
|
|
10
|
57
|
|
|
57
|
|
224
|
use Test2::Util qw/get_tid/; |
|
57
|
|
|
|
|
51
|
|
|
57
|
|
|
|
|
11242
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $ID = 1; |
13
|
|
|
|
|
|
|
sub init { |
14
|
42
|
|
|
42
|
0
|
49
|
my $self = shift; |
15
|
42
|
|
|
|
|
147
|
$self->SUPER::init(@_); |
16
|
42
|
|
33
|
|
|
236
|
$self->{+ID} ||= join "-", $$, get_tid, $ID++; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub process { |
20
|
200
|
|
|
200
|
1
|
162
|
my $self = shift; |
21
|
200
|
|
|
|
|
178
|
my ($e) = @_; |
22
|
200
|
|
|
|
|
371
|
$e->set_nested($self->nested); |
23
|
200
|
|
|
|
|
443
|
$e->set_in_subtest($self->{+ID}); |
24
|
200
|
100
|
|
|
|
820
|
$self->set_bailed_out($e) if $e->isa('Test2::Event::Bail'); |
25
|
200
|
|
|
|
|
404
|
$self->SUPER::process($e); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub send { |
29
|
198
|
|
|
198
|
1
|
183
|
my $self = shift; |
30
|
198
|
|
|
|
|
175
|
my ($e) = @_; |
31
|
|
|
|
|
|
|
|
32
|
198
|
|
|
|
|
517
|
my $out = $self->SUPER::send($e); |
33
|
|
|
|
|
|
|
|
34
|
197
|
100
|
|
|
|
326
|
return $out if $self->{+MANUAL_SKIP_ALL}; |
35
|
196
|
50
|
66
|
|
|
1136
|
return $out unless $e->isa('Test2::Event::Plan') |
|
|
|
0
|
|
|
|
|
|
|
|
33
|
|
|
|
|
36
|
|
|
|
|
|
|
&& $e->directive eq 'SKIP' |
37
|
|
|
|
|
|
|
&& ($e->trace->pid != $self->pid || $e->trace->tid != $self->tid); |
38
|
|
|
|
|
|
|
|
39
|
57
|
|
|
57
|
|
237
|
no warnings 'exiting'; |
|
57
|
|
|
|
|
48
|
|
|
57
|
|
|
|
|
5718
|
|
40
|
0
|
|
|
|
|
0
|
last T2_SUBTEST_WRAPPER; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub terminate { |
44
|
4
|
|
|
4
|
0
|
16
|
my $self = shift; |
45
|
4
|
|
|
|
|
4
|
my ($code, $e) = @_; |
46
|
4
|
|
|
|
|
9
|
$self->set_exit_code($code); |
47
|
|
|
|
|
|
|
|
48
|
4
|
100
|
|
|
|
8
|
return if $self->{+MANUAL_SKIP_ALL}; |
49
|
2
|
50
|
33
|
|
|
11
|
return if $e->isa('Test2::Event::Plan') |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
50
|
|
|
|
|
|
|
&& $e->directive eq 'SKIP' |
51
|
|
|
|
|
|
|
&& ($e->trace->pid != $$ || $e->trace->tid != get_tid); |
52
|
|
|
|
|
|
|
|
53
|
57
|
|
|
57
|
|
213
|
no warnings 'exiting'; |
|
57
|
|
|
|
|
51
|
|
|
57
|
|
|
|
|
2367
|
|
54
|
2
|
|
|
|
|
6
|
last T2_SUBTEST_WRAPPER; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |