From eccf995a0c674bf8aa71c22040ba367a81ba75ba Mon Sep 17 00:00:00 2001 From: Fred Hornsey Date: Fri, 7 Mar 2025 13:32:32 -0600 Subject: [PATCH] Revert changes Revert changes from https://github.com/DOCGroup/autobuild/pull/79 that broke OpenDDS scoreboard. --- scoreboard.pl | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/scoreboard.pl b/scoreboard.pl index aeb89367c..03f95e39e 100755 --- a/scoreboard.pl +++ b/scoreboard.pl @@ -206,6 +206,34 @@ sub set_latest_build_info } } +sub update_latest_build_info +{ + my $dir = shift; + my $buildname = shift; + my $file_name = "$dir/$buildname/latest.txt"; + my $latest; + my $fh = new FileHandle($file_name, 'r'); + if (defined $fh) { + print " Loading latest from $file_name\n" if ($verbose); + while (<$fh>) { + if ($_ =~ m/($timestamp_re) /) { + $builds{$buildname}{BASENAME} = $1; + $latest = $_; + } + } + undef $fh; + } else { + print STDERR " Error: Could not find $file_name\n"; + return 0; + } + if (!defined $latest) { + print STDERR " Error: Could not read latest build info for $buildname\n"; + return 0; + } + set_latest_build_info($latest, $buildname); + return 1; +} + sub write_failed_tests_by_test { my $directory = shift; @@ -764,11 +792,7 @@ ($) my $diffRoot = $builds{$buildname}->{DIFFROOT}; utility::index_logs($build_dir, $buildname, $diffRoot); } - if (!defined $latest_text) { - print STDERR " Error: Could not read latest build info for $buildname\n"; - return 0; - } - set_latest_build_info($latest_text, $buildname); + update_latest_build_info($directory, $buildname); } write_failed_tests_by_test($directory, \%failed_tests_by_test); }