line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test2::Hub::Subtest; |
2
|
246
|
|
|
246
|
|
2059
|
use strict; |
|
246
|
|
|
|
|
498
|
|
|
246
|
|
|
|
|
7605
|
|
3
|
246
|
|
|
246
|
|
1250
|
use warnings; |
|
246
|
|
|
|
|
469
|
|
|
246
|
|
|
|
|
14492
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302180'; |
6
|
|
|
|
|
|
|
|
7
|
246
|
|
|
246
|
|
1495
|
BEGIN { require Test2::Hub; our @ISA = qw(Test2::Hub) } |
|
246
|
|
|
|
|
11512
|
|
8
|
246
|
|
|
246
|
|
1647
|
use Test2::Util::HashBase qw/nested exit_code manual_skip_all/; |
|
246
|
|
|
|
|
516
|
|
|
246
|
|
|
|
|
1731
|
|
9
|
246
|
|
|
246
|
|
1690
|
use Test2::Util qw/get_tid/; |
|
246
|
|
|
|
|
541
|
|
|
246
|
|
|
|
|
31689
|
|
10
|
|
|
|
|
|
|
|
11
|
105
|
|
|
105
|
0
|
645
|
sub is_subtest { 1 } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub inherit { |
14
|
272
|
|
|
272
|
0
|
522
|
my $self = shift; |
15
|
272
|
|
|
|
|
553
|
my ($from) = @_; |
16
|
|
|
|
|
|
|
|
17
|
272
|
|
|
|
|
1269
|
$self->SUPER::inherit($from); |
18
|
|
|
|
|
|
|
|
19
|
272
|
|
|
|
|
950
|
$self->{+NESTED} = $from->nested + 1; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
{ |
23
|
|
|
|
|
|
|
# Legacy |
24
|
246
|
|
|
246
|
|
1954
|
no warnings 'once'; |
|
246
|
|
|
|
|
554
|
|
|
246
|
|
|
|
|
45270
|
|
25
|
|
|
|
|
|
|
*ID = \&Test2::Hub::HID; |
26
|
|
|
|
|
|
|
*id = \&Test2::Hub::hid; |
27
|
|
|
|
|
|
|
*set_id = \&Test2::Hub::set_hid; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub send { |
31
|
1431
|
|
|
1431
|
1
|
2361
|
my $self = shift; |
32
|
1431
|
|
|
|
|
2614
|
my ($e) = @_; |
33
|
|
|
|
|
|
|
|
34
|
1431
|
|
|
|
|
4885
|
my $out = $self->SUPER::send($e); |
35
|
|
|
|
|
|
|
|
36
|
1423
|
100
|
|
|
|
3876
|
return $out if $self->{+MANUAL_SKIP_ALL}; |
37
|
|
|
|
|
|
|
|
38
|
1422
|
|
|
|
|
3807
|
my $f = $e->facet_data; |
39
|
|
|
|
|
|
|
|
40
|
1422
|
100
|
|
|
|
7258
|
my $plan = $f->{plan} or return $out; |
41
|
251
|
50
|
|
|
|
1452
|
return $out unless $plan->{skip}; |
42
|
|
|
|
|
|
|
|
43
|
0
|
0
|
|
|
|
0
|
my $trace = $f->{trace} or die "Missing Trace!"; |
44
|
|
|
|
|
|
|
return $out unless $trace->{pid} != $self->pid |
45
|
0
|
0
|
0
|
|
|
0
|
|| $trace->{tid} != $self->tid; |
46
|
|
|
|
|
|
|
|
47
|
246
|
|
|
246
|
|
1890
|
no warnings 'exiting'; |
|
246
|
|
|
|
|
603
|
|
|
246
|
|
|
|
|
40953
|
|
48
|
0
|
|
|
|
|
0
|
last T2_SUBTEST_WRAPPER; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub terminate { |
52
|
11
|
|
|
11
|
0
|
49
|
my $self = shift; |
53
|
11
|
|
|
|
|
29
|
my ($code, $e, $f) = @_; |
54
|
11
|
|
|
|
|
39
|
$self->set_exit_code($code); |
55
|
|
|
|
|
|
|
|
56
|
11
|
100
|
|
|
|
34
|
return if $self->{+MANUAL_SKIP_ALL}; |
57
|
|
|
|
|
|
|
|
58
|
9
|
|
66
|
|
|
29
|
$f ||= $e->facet_data; |
59
|
|
|
|
|
|
|
|
60
|
9
|
100
|
|
|
|
42
|
if(my $plan = $f->{plan}) { |
61
|
5
|
50
|
|
|
|
17
|
my $trace = $f->{trace} or die "Missing Trace!"; |
62
|
|
|
|
|
|
|
return if $plan->{skip} |
63
|
5
|
50
|
33
|
|
|
39
|
&& ($trace->{pid} != $$ || $trace->{tid} != get_tid); |
|
|
|
33
|
|
|
|
|
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
246
|
|
|
246
|
|
1843
|
no warnings 'exiting'; |
|
246
|
|
|
|
|
583
|
|
|
246
|
|
|
|
|
18035
|
|
67
|
9
|
|
|
|
|
102
|
last T2_SUBTEST_WRAPPER; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
__END__ |