summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-03-21 01:21:39 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-03-21 01:21:39 +0000
commit1e2433f7032b20a3274a59e4a3b7b9b4398f6c2c (patch)
tree060b3a3e8ca5c8fa0150c1375e87086121fbc9c4
parent0f546dd9ca09cc1539d6c9ee0c984ce98cc0fd64 (diff)
downloadbcm5719-llvm-1e2433f7032b20a3274a59e4a3b7b9b4398f6c2c.tar.gz
bcm5719-llvm-1e2433f7032b20a3274a59e4a3b7b9b4398f6c2c.zip
Cause the various warnings list to be generated via a <ul> list with
text enclosed in <tt>. This ensures that (a) the text is in a fixed width font (to indicated generated text) and (b) the text wraps without causing the page width to be extended. The main result of this is that the report will wrap to conform to the window size in which it is displayed instead of having a very wide length if a warning message is long. llvm-svn: 26916
-rwxr-xr-xllvm/utils/NightlyTest.pl24
-rw-r--r--llvm/utils/NightlyTestTemplate.html10
2 files changed, 25 insertions, 9 deletions
diff --git a/llvm/utils/NightlyTest.pl b/llvm/utils/NightlyTest.pl
index db61914cddc..f2a8de0bc57 100755
--- a/llvm/utils/NightlyTest.pl
+++ b/llvm/utils/NightlyTest.pl
@@ -151,7 +151,21 @@ sub AddRecord {
sub AddPreTag { # Add pre tags around nonempty list, or convert to "none"
$_ = shift;
- if (length) { return "<ul><tt>$_</tt></ul>"; } else { "<b>none</b><br>"; }
+ if (length) { return "<pre>$_</pre>"; } else { "<b>none</b><br>"; }
+}
+
+sub ArrayToList { # Add <li> tags around nonempty list or convert to "none"
+ my $result = "";
+ if (scalar @_) {
+ $result = "<ul>";
+ foreach $item (@_) {
+ $result .= "<li><tt>$item</tt></li>";
+ }
+ $result .= "</ul>";
+ } else {
+ $result = "<p><b>none</b></p>";
+ }
+ return $result;
}
sub ChangeDir { # directory, logical name
@@ -528,7 +542,7 @@ foreach $Warning (@Warn) {
}
}
my $WarningsFile = join "\n", @Warnings;
-my $WarningsList = AddPreTag $WarningsFile;
+my $WarningsList = ArrayToList @Warnings;
$WarningsFile =~ s/:[0-9]+:/::/g;
# Emit the warnings file, so we can diff...
@@ -539,8 +553,10 @@ my ($WarningsAdded, $WarningsRemoved) = DiffFiles "-Warnings.txt";
print "ADDED WARNINGS:\n$WarningsAdded\n\n" if (length $WarningsAdded);
print "REMOVED WARNINGS:\n$WarningsRemoved\n\n" if (length $WarningsRemoved);
-$WarningsAdded = AddPreTag $WarningsAdded;
-$WarningsRemoved = AddPreTag $WarningsRemoved;
+my @TmpWarningsAdded = split "\n", $WarningsAdded;
+my @TmpWarningsRemoved = split "\n", $WarningsRemoved;
+$WarningsAdded = ArrayToList @TmpWarningsAdded;
+$WarningsRemoved = ArrayToList @TmpWarningsRemoved;
#
# Get some statistics about CVS commits over the current day...
diff --git a/llvm/utils/NightlyTestTemplate.html b/llvm/utils/NightlyTestTemplate.html
index 5312ebb4268..c38bb2e776b 100644
--- a/llvm/utils/NightlyTestTemplate.html
+++ b/llvm/utils/NightlyTestTemplate.html
@@ -77,7 +77,7 @@
</ul>
<h2>Warnings during the build:</h2>
-<p>$WarningsList</p>
+$WarningsList
<br><br><center>
<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#000000">
@@ -95,10 +95,10 @@
</ul><p>
<h2>Changes to Warnings:</h2>
-<ul>
-<li>Warnings Added: $WarningsAdded
-<li>Warnings Removed: $WarningsRemoved
-</ul><p>
+<p>Warnings Added:</p>
+$WarningsAdded
+<p>Warnings Removed:</p>
+$WarningsRemoved
<h2>Changes in the test suite:</h2>
<ul>
OpenPOWER on IntegriCloud