63 |
sub as_markup { |
sub as_markup { |
64 |
my ($self) = @_; |
my ($self) = @_; |
65 |
|
|
66 |
|
=for later |
67 |
|
|
68 |
my $path = 'var/test/'; |
my $path = 'var/test/'; |
69 |
my $running_pid = "$path/running.pid"; |
my $running_pid = "$path/running.pid"; |
70 |
|
|
71 |
my $pid = read_file $running_pid if -e $running_pid; |
my $pid = read_file $running_pid if -e $running_pid; |
72 |
if ( $pid ) { |
if ( $pid ) { |
73 |
if ( kill 0, $pid ) { |
if ( kill 0, $pid ) { |
74 |
warn "ABORTING: $self started twice"; |
warn "ABORTING: $self allready running as pid $pid"; |
75 |
return 'abort'; |
return 'abort'; |
76 |
} else { |
} else { |
77 |
warn "got $pid from $running_pid but no process alive, ignoring..."; |
warn "got $pid from $running_pid but no process alive, ignoring..."; |
81 |
write_file( $running_pid, $$ ); |
write_file( $running_pid, $$ ); |
82 |
warn "# started $self with pid $$ -> $running_pid"; |
warn "# started $self with pid $$ -> $running_pid"; |
83 |
|
|
84 |
|
=cut |
85 |
|
|
86 |
my $f = TAP::Formatter::HTML->new({ |
my $f = TAP::Formatter::HTML->new({ |
87 |
# silent => 1, |
# silent => 1, |
88 |
|
|
111 |
warn "can't find any tests ", dump( $self->tests ), " within depends ", dump( $self->test_because ); |
warn "can't find any tests ", dump( $self->tests ), " within depends ", dump( $self->test_because ); |
112 |
# warn "running all tests instead"; |
# warn "running all tests instead"; |
113 |
# @tests = glob('t/*.t'); |
# @tests = glob('t/*.t'); |
114 |
@tests = glob('t/01*.t'); # XXX default tests |
@tests = ( qw{t/00-load.t t/pod.t} ); # XXX default tests |
115 |
} |
} |
116 |
|
|
117 |
$self->title( join(' ', @tests ) ); |
$self->title( join(' ', @tests ) ); |
167 |
} @tests ) |
} @tests ) |
168 |
. qq|</li></ul>| |
. qq|</li></ul>| |
169 |
; |
; |
170 |
|
} else { |
171 |
|
warn "# test_because empty"; |
172 |
} |
} |
173 |
|
|
174 |
$self->add_icon( $1 ) if $html =~ m{class="(passed|failed)"}; |
$self->add_icon( $1 ) if $html =~ m{class="(passed|failed)"}; |
175 |
|
|
176 |
|
=for later |
177 |
|
|
178 |
unlink $running_pid or die "can't remove $running_pid: $!"; |
unlink $running_pid or die "can't remove $running_pid: $!"; |
179 |
|
|
180 |
|
=cut |
181 |
|
|
182 |
return $html; |
return $html; |
183 |
} |
} |
184 |
|
|