147 $item =~ /^([^,]+,[^,]+,([^,]+)),([^,]+)/; |
147 $item =~ /^([^,]+,[^,]+,([^,]+)),([^,]+)/; |
148 $remains = $1; |
148 $remains = $1; |
149 $value = $2; |
149 $value = $2; |
150 $status = $3; |
150 $status = $3; |
151 chomp($status); |
151 chomp($status); |
152 if ($status ne "OK") {$status = "KO"}; |
152 if ($status ne "OK") {$status = "Bad"}; |
153 if ($seen{$value}) |
153 if ($seen{$value}) |
154 { |
154 { |
155 $seen{$value} =~ /^[^,]+,([^,]+)/; |
155 $seen{$value} =~ /^[^,]+,([^,]+)/; |
156 my $currentstatus = $1; |
156 my $currentstatus = $1; |
157 if ($currentstatus eq "KO") |
157 if ($currentstatus eq "Bad") |
158 { |
158 { |
159 $status = "KO"; |
159 $status = "Bad"; |
160 } |
160 } |
161 } |
161 } |
162 $seen{$value} = "$remains,$status\n"; |
162 $seen{$value} = "$remains,$status\n"; |
163 } |
163 } |
164 my @uniq = values(%seen); |
164 my @uniq = values(%seen); |
165 |
165 |
166 # Prepend system model info (block name, component name) |
166 # Prepend system model info (block name, component name) |
167 foreach my $line (@uniq) |
167 foreach my $line (@uniq) |
168 { |
168 { |
|
169 chomp $line; |
169 if ($line =~ /^[^,]+,[^,]+,([^,]+),/) |
170 if ($line =~ /^[^,]+,[^,]+,([^,]+),/) |
170 { |
171 { |
171 my $bldfile = $1; |
172 my $bldfile = $1; |
172 my $sysmodelinfo = &getSysModelInfo($bldfile); |
173 my $sysmodelinfo = &getSysModelInfo($bldfile); |
173 $line = "$sysmodelinfo, $line"; |
174 $line = "$line, $sysmodelinfo\n"; |
174 } |
175 } |
175 } |
176 } |
176 |
177 |
177 |
178 |
178 # Write the summary log |
179 # Write the summary log |
179 open(OUTPUT,">PkgComponentAnalysisSummary.csv") or die "Error: Couldn't open PkgComponentAnalysisSummary.csv for writing\n"; |
180 open(OUTPUT,">PkgComponentAnalysisSummary.csv") or die "Error: Couldn't open PkgComponentAnalysisSummary.csv for writing\n"; |
180 print OUTPUT "Package Name, Component Name, Package Path (from Sources.csv), License, BldFile (from whatlog), Status\n"; |
181 print OUTPUT "Source Path (from Sources.csv), License, BldFile (from whatlog), Package Name, Component Name\n"; |
181 print OUTPUT @uniq; |
182 print OUTPUT @uniq; |
182 close(OUTPUT); |
183 close(OUTPUT); |
183 close(WHATLOG); |
184 close(WHATLOG); |
184 |
185 |
185 # Status statistics |
186 # Status statistics |