Branch Coverage

blib/lib/FusionInventory/Agent/Tools/Generic.pm
Criterion Covered Total %
branch 57 78 73.0


line true false branch
87 6 28 unless $infos->{'4'}
91 146 41 if $info->{'Status'} and $info->{'Status'} =~ /Unpopulated|Disabled/i
100 7 0 if $manufacturer and $manufacturer eq '000000000000' and ($version and $version eq '00000000000000000000000000000000')
117 32 2 if ($cpu->{'ID'})
128 22 12 if ($info->{'Version'})
129 0 22 if ($info->{'Version'} =~ /([\d\.]+)MHz$/) { }
16 6 elsif ($info->{'Version'} =~ /([\d\.]+)GHz$/) { }
136 16 2 if (not $cpu->{'SPEED'} and $info->{'Current Speed'})
137 16 0 if ($info->{'Current Speed'} =~ /^\s*(\d{3,4})\s*Mhz/i) { }
0 0 elsif ($info->{'Current Speed'} =~ /^\s*(\d+)\s*Ghz/i) { }
144 27 7 if ($info->{'External Clock'})
145 27 0 if ($info->{'External Clock'} =~ /^\s*(\d+)\s*Mhz/i) { }
0 0 elsif ($info->{'External Clock'} =~ /^\s*(\d+)\s*Ghz/i) { }
163 0 1 $params{'device'} ? :
165 0 1 unless $handle
169 1 89 if $line =~ /Model Number:\s+(\S.+\S)/
170 1 89 if $line =~ /Firmware Revision:\s+(\S+)/
171 1 89 if $line =~ /Serial Number:\s+(\S*)/
172 1 89 if $line =~ /1000:\s+(\d*)\sMBytes/
173 1 89 if $line =~ /Transport:.+(SCSI|SATA|USB)/
174 1 89 if $line =~ /WWN Device Identifier:\s+(\S+)/
233 1 23 unless $PCIVendors
235 0 24 unless $params{'id'}
242 0 24 unless $PCIClasses
244 0 24 unless $params{'id'}
251 2 16 unless $USBVendors
253 0 18 unless $params{'id'}
260 0 0 unless $USBClasses
262 0 0 unless $params{'id'}
269 2 61 unless $EDIDVendors
271 0 63 unless $params{'id'}
293 0 3 unless $handle
299 41924 23352 if ($line =~ /^\t (\S{4}) \s+ (.*)/x) { }
11355 11997 elsif ($line =~ /^\t\t (\S{4}) \s+ (\S{4}) \s+ (.*)/x) { }
7930 4067 elsif ($line =~ /^(\S{4}) \s+ (.*)/x) { }
59 4008 elsif ($line =~ /^C \s+ (\S{2}) \s+ (.*)/x) { }
373 3635 elsif ($line =~ /^\t (\S{2}) \s+ (.*)/x) { }
331 0 2 unless $handle
334 32 4344 unless $line =~ /^([A-Z]{3}) __ (.*)$/