Branch Coverage

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


line true false branch
87 6 26 unless $infos->{'4'}
91 146 39 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 30 2 if ($cpu->{'ID'})
128 21 11 if ($info->{'Version'})
129 0 21 if ($info->{'Version'} =~ /([\d\.]+)MHz$/) { }
15 6 elsif ($info->{'Version'} =~ /([\d\.]+)GHz$/) { }
136 15 2 if (not $cpu->{'SPEED'} and $info->{'Current Speed'})
137 15 0 if ($info->{'Current Speed'} =~ /^\s*(\d{3,4})\s*Mhz/i) { }
0 0 elsif ($info->{'Current Speed'} =~ /^\s*(\d+)\s*Ghz/i) { }
144 25 7 if ($info->{'External Clock'})
145 25 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 1 5 unless $USBVendors
253 0 6 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 2 unless $handle
299 27336 18707 if ($line =~ /^\t (\S{4}) \s+ (.*)/x) { }
11354 7353 elsif ($line =~ /^\t\t (\S{4}) \s+ (\S{4}) \s+ (.*)/x) { }
5005 2348 elsif ($line =~ /^(\S{4}) \s+ (.*)/x) { }
40 2308 elsif ($line =~ /^C \s+ (\S{2}) \s+ (.*)/x) { }
240 2068 elsif ($line =~ /^\t (\S{2}) \s+ (.*)/x) { }
331 0 2 unless $handle
334 32 4344 unless $line =~ /^([A-Z]{3}) __ (.*)$/