diff options
| -rwxr-xr-x | t/chainlint.pl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/t/chainlint.pl b/t/chainlint.pl index ea154a206a..f00a3b937b 100755 --- a/t/chainlint.pl +++ b/t/chainlint.pl @@ -715,6 +715,9 @@ sub ncores { if (open my $fh, '<', '/proc/cpuinfo') { my $cpuinfo = do { local $/; <$fh> }; close($fh); + if ($cpuinfo =~ /^n?cpus active\s*:\s*(\d+)/m) { + return $1 if $1 > 0; + } my @matches = ($cpuinfo =~ /^(processor|CPU)[\s\d]*:/mg); return @matches ? scalar(@matches) : 1; } |
