mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-19 01:34:32 +00:00
Add information about new warnings and warning changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5378 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4170123278
commit
2f8cb57169
@ -11,6 +11,60 @@
|
|||||||
#
|
#
|
||||||
use POSIX qw(strftime);
|
use POSIX qw(strftime);
|
||||||
|
|
||||||
|
my $HOME = $ENV{HOME};
|
||||||
|
my $CVSRootDir = "/home/vadve/vadve/Research/DynOpt/CVSRepository";
|
||||||
|
my $BuildDir = "$HOME/buildtest";
|
||||||
|
my $WebDir = "$HOME/cvs/testresults-X86";
|
||||||
|
|
||||||
|
# Calculate the date prefix...
|
||||||
|
@TIME = localtime;
|
||||||
|
my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3];
|
||||||
|
my $DateString = strftime "%B %d, %Y", localtime;
|
||||||
|
|
||||||
|
sub WriteFile { # (filename, contents)
|
||||||
|
open (FILE, ">$_[0]") or die "Could not open file '$_[0]' for writing!";
|
||||||
|
print FILE $_[1];
|
||||||
|
close FILE;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub GetRegex { # (Regex with ()'s, value)
|
||||||
|
$_[1] =~ /$_[0]/;
|
||||||
|
return $1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub AddPreTag { # Add pre tags around nonempty list, or convert to "none"
|
||||||
|
$_ = shift;
|
||||||
|
if (length) { return "<pre> $_</pre>"; } else { "<b>none</b><br>"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
sub GetDir {
|
||||||
|
my $Suffix = shift;
|
||||||
|
opendir DH, $WebDir;
|
||||||
|
my @Result = reverse sort grep !/$DATE/, grep /[-0-9]+$Suffix/, readdir DH;
|
||||||
|
closedir DH;
|
||||||
|
return @Result;
|
||||||
|
}
|
||||||
|
|
||||||
|
# DiffFiles - Diff the current version of the file against the last version of
|
||||||
|
# the file, reporting things added and removed. This is used to report, for
|
||||||
|
# example, added and removed warnings. This returns a pair (added, removed)
|
||||||
|
#
|
||||||
|
sub DiffFiles {
|
||||||
|
my $Suffix = shift;
|
||||||
|
my @Others = GetDir $Suffix;
|
||||||
|
if (@Others == 0) { # No other files? We added all entries...
|
||||||
|
return (`cat $WebDir/$DATE$Suffix`, "");
|
||||||
|
}
|
||||||
|
# Diff the files now...
|
||||||
|
my @Diffs = split "\n", `diff $WebDir/$DATE$Suffix $WebDir/$Others[0]`;
|
||||||
|
my $Added = join "\n", grep /^</, @Diffs;
|
||||||
|
my $Removed = join "\n", grep /^>/, @Diffs;
|
||||||
|
$Added =~ s/^< / /gm;
|
||||||
|
$Removed =~ s/^> / /gm;
|
||||||
|
return ($Added, $Removed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Command line argument settings...
|
# Command line argument settings...
|
||||||
my $NOCHECKOUT = 0;
|
my $NOCHECKOUT = 0;
|
||||||
my $NOREMOVE = 0;
|
my $NOREMOVE = 0;
|
||||||
@ -29,12 +83,7 @@ while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) {
|
|||||||
print "Unknown option: $_ : ignoring!\n";
|
print "Unknown option: $_ : ignoring!\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
die "Must specify 0 or 4 options!" if (@ARGV != 0 and @ARGV != 4);
|
die "Must specify 0 or 3 options!" if (@ARGV != 0 and @ARGV != 3);
|
||||||
|
|
||||||
my $HOME = $ENV{HOME};
|
|
||||||
my $CVSRootDir = "/home/vadve/vadve/Research/DynOpt/CVSRepository";
|
|
||||||
my $BuildDir = "$HOME/buildtest";
|
|
||||||
my $WebDir = "$HOME/cvs/testresults-X86";
|
|
||||||
|
|
||||||
# FIXME: This should just be utils/...
|
# FIXME: This should just be utils/...
|
||||||
my $Template = "$HOME/llvm/utils/NightlyTestTemplate.html";
|
my $Template = "$HOME/llvm/utils/NightlyTestTemplate.html";
|
||||||
@ -45,11 +94,6 @@ if (@ARGV == 3) {
|
|||||||
$WebDir = $ARGV[2];
|
$WebDir = $ARGV[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
# Calculate the date prefix...
|
|
||||||
@TIME = localtime;
|
|
||||||
my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3];
|
|
||||||
my $DateString = strftime "%B %d, %Y", localtime;
|
|
||||||
|
|
||||||
my $Prefix = "$WebDir/$DATE";
|
my $Prefix = "$WebDir/$DATE";
|
||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
@ -77,11 +121,6 @@ open (TEMPLATEFILE, $Template) or die "Could not open file 'llvm/$Template'!";
|
|||||||
my $TemplateContents = <TEMPLATEFILE>;
|
my $TemplateContents = <TEMPLATEFILE>;
|
||||||
close(TEMPLATEFILE);
|
close(TEMPLATEFILE);
|
||||||
|
|
||||||
sub GetRegex {
|
|
||||||
$_[1] =~ /$_[0]/;
|
|
||||||
return $1;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get some static statistics about the current state of CVS
|
# Get some static statistics about the current state of CVS
|
||||||
my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-CVS-Log.txt`;
|
my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-CVS-Log.txt`;
|
||||||
my $NumFilesInCVS = `grep ^U $Prefix-CVS-Log.txt | wc -l` + 0;
|
my $NumFilesInCVS = `grep ^U $Prefix-CVS-Log.txt | wc -l` + 0;
|
||||||
@ -111,11 +150,6 @@ my $NumObjects = `grep '^Compiling' $Prefix-Build-Log.txt | wc -l` + 0;
|
|||||||
my $BuildTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-Build-Log.txt`;
|
my $BuildTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-Build-Log.txt`;
|
||||||
|
|
||||||
|
|
||||||
sub AddPreTag { # Add pre tags around nonempty list, or convert to "none"
|
|
||||||
$_ = shift;
|
|
||||||
if (length) { return "<pre> $_</pre>"; } else { "<b>none</b><br>"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get warnings from the build
|
# Get warnings from the build
|
||||||
my @Warn = split "\n", `grep -E 'warning:|Entering dir' $Prefix-Build-Log.txt`;
|
my @Warn = split "\n", `grep -E 'warning:|Entering dir' $Prefix-Build-Log.txt`;
|
||||||
my @Warnings;
|
my @Warnings;
|
||||||
@ -132,7 +166,13 @@ foreach $Warning (@Warn) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
my $WarningsList = AddPreTag join "\n ", @Warnings;
|
my $WarningsList = AddPreTag join "\n ", @Warnings;
|
||||||
|
my $WarningsFile = join "\n", @Warnings; $WarningsFile =~ s/:[0-9]+:/::/g;
|
||||||
|
|
||||||
|
# Emit the warnings file, so we can diff...
|
||||||
|
WriteFile "$WebDir/$DATE-Warnings.txt", $WarningsFile . "\n";
|
||||||
|
my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt";
|
||||||
|
$WarningsAdded = AddPreTag $WarningsAdded;
|
||||||
|
$WarningsRemoved = AddPreTag $WarningsRemoved;
|
||||||
|
|
||||||
# Get some statistics about CVS commits over the current day...
|
# Get some statistics about CVS commits over the current day...
|
||||||
@CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`;
|
@CVSHistory = split "\n", `cvs history -D '1 day ago' -a -xAMROCGUW`;
|
||||||
@ -174,11 +214,7 @@ my $ModifiedFilesList = AddPreTag join "\n ", keys %ModifiedFiles;
|
|||||||
my $RemovedFilesList = AddPreTag join "\n ", keys %RemovedFiles;
|
my $RemovedFilesList = AddPreTag join "\n ", keys %RemovedFiles;
|
||||||
|
|
||||||
# Get a list of the previous days that we can link to...
|
# Get a list of the previous days that we can link to...
|
||||||
system "rm -f $WebDir/$DATE.html"; # Don't relist self if regenerating...
|
my @PrevDays = map {s/.html//; $_} GetDir ".html";
|
||||||
opendir DH, $WebDir;
|
|
||||||
my @PrevDays =
|
|
||||||
map {s/.html//; $_} reverse sort grep /[-0-9]+.html/, readdir DH;
|
|
||||||
closedir DH;
|
|
||||||
|
|
||||||
splice @PrevDays, 20; # Trim down list to something reasonable...
|
splice @PrevDays, 20; # Trim down list to something reasonable...
|
||||||
|
|
||||||
@ -210,13 +246,15 @@ if (0) {
|
|||||||
print "Previous Days =\n $PrevDaysList\n";
|
print "Previous Days =\n $PrevDaysList\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Output the file...
|
#
|
||||||
|
# Output the files...
|
||||||
|
#
|
||||||
|
|
||||||
|
# Main HTML file...
|
||||||
chdir $WebDir or die "Could not change into web directory!";
|
chdir $WebDir or die "Could not change into web directory!";
|
||||||
my $Output;
|
my $Output;
|
||||||
eval "\$Output = <<ENDOFFILE;$TemplateContents\nENDOFFILE\n";
|
eval "\$Output = <<ENDOFFILE;$TemplateContents\nENDOFFILE\n";
|
||||||
open(OUTFILE, ">$DATE.html") or die "Cannot open output file!";
|
WriteFile "$DATE.html", $Output;
|
||||||
print OUTFILE $Output;
|
|
||||||
close(OUTFILE);
|
|
||||||
|
|
||||||
# Change the index.html symlink...
|
# Change the index.html symlink...
|
||||||
system "ln -sf $DATE.html index.html";
|
system "ln -sf $DATE.html index.html";
|
||||||
@ -229,9 +267,7 @@ sub AddRecord {
|
|||||||
close FILE;
|
close FILE;
|
||||||
}
|
}
|
||||||
push @Records, "$DATE: $Val";
|
push @Records, "$DATE: $Val";
|
||||||
open FILE, ">$Filename" or die "Couldn't open data file $Filename";
|
WriteFile $Filename, (join "\n", @Records) . "\n";
|
||||||
print FILE (join "\n", @Records), "\n";
|
|
||||||
close FILE;
|
|
||||||
return @Records;
|
return @Records;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
<html><head><title>LLVM Test Results for $DateString</title></head>
|
<html><head><title>LLVM Test Results for $DateString</title></head>
|
||||||
|
|
||||||
@ -75,6 +76,12 @@ $WarningsList<p>
|
|||||||
<li>Removed Files: $RemovedFilesList
|
<li>Removed Files: $RemovedFilesList
|
||||||
</ul><p>
|
</ul><p>
|
||||||
|
|
||||||
|
<h2>Changes to Warnings:</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Warnings Added: $WarningsAdded
|
||||||
|
<li>Warnings Removed: $WarningsRemoved
|
||||||
|
</ul><p>
|
||||||
|
|
||||||
<h2>Changes in the test suite:</h2>
|
<h2>Changes in the test suite:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>New Tests: ...
|
<li>New Tests: ...
|
||||||
|
Loading…
Reference in New Issue
Block a user