projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
js-Validator: Kommentar-Update
[kivitendo-erp.git]
/
t
/
structure
/
no_lexicals_in_postif.t
diff --git
a/t/structure/no_lexicals_in_postif.t
b/t/structure/no_lexicals_in_postif.t
index
3f90693
..
b9f9c4c
100644
(file)
--- a/
t/structure/no_lexicals_in_postif.t
+++ b/
t/structure/no_lexicals_in_postif.t
@@
-1,7
+1,10
@@
use strict;
use strict;
+use threads;
use lib 't';
use Support::Files;
use lib 't';
use Support::Files;
+use Sys::CPU;
use Test::More;
use Test::More;
+use Thread::Pool::Simple;
if (eval { require PPI; 1 }) {
plan tests => scalar(@Support::Files::testitems);
if (eval { require PPI; 1 }) {
plan tests => scalar(@Support::Files::testitems);
@@
-23,7
+26,8
@@
my $fh;
my @testitems = @Support::Files::testitems;
my @testitems = @Support::Files::testitems;
-foreach my $file (@testitems) {
+sub test_file {
+ my ($file) = @_;
my $clean = 1;
my $source;
{
my $clean = 1;
my $source;
{
@@
-63,3
+67,14
@@
foreach my $file (@testitems) {
ok $clean, $file;
}
ok $clean, $file;
}
+
+my $pool = Thread::Pool::Simple->new(
+ min => 2,
+ max => Sys::CPU::cpu_count() + 1,
+ do => [ \&test_file ],
+ passid => 0,
+);
+
+$pool->add($_) for @testitems;
+
+$pool->join;