File tree Expand file tree Collapse file tree 1 file changed +29
-5
lines changed
Expand file tree Collapse file tree 1 file changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,34 @@ sub set_latest_build_info
206206 }
207207}
208208
209+ sub update_latest_build_info
210+ {
211+ my $dir = shift ;
212+ my $buildname = shift ;
213+ my $file_name = " $dir /$buildname /latest.txt" ;
214+ my $latest ;
215+ my $fh = new FileHandle($file_name , ' r' );
216+ if (defined $fh ) {
217+ print " Loading latest from $file_name \n " if ($verbose );
218+ while (<$fh >) {
219+ if ($_ =~ m / ($timestamp_re ) / ) {
220+ $builds {$buildname }{BASENAME } = $1 ;
221+ $latest = $_ ;
222+ }
223+ }
224+ undef $fh ;
225+ } else {
226+ print STDERR " Error: Could not find $file_name \n " ;
227+ return 0;
228+ }
229+ if (!defined $latest ) {
230+ print STDERR " Error: Could not read latest build info for $buildname \n " ;
231+ return 0;
232+ }
233+ set_latest_build_info($latest , $buildname );
234+ return 1;
235+ }
236+
209237sub write_failed_tests_by_test
210238{
211239 my $directory = shift ;
764792 my $diffRoot = $builds {$buildname }-> {DIFFROOT };
765793 utility::index_logs($build_dir , $buildname , $diffRoot );
766794 }
767- if (!defined $latest_text ) {
768- print STDERR " Error: Could not read latest build info for $buildname \n " ;
769- return 0;
770- }
771- set_latest_build_info($latest_text , $buildname );
795+ update_latest_build_info($directory , $buildname );
772796 }
773797 write_failed_tests_by_test($directory , \%failed_tests_by_test );
774798}
You can’t perform that action at this time.
0 commit comments