[tools] testbot/web: Simplify generating the Submit page header.

Francois Gouget fgouget at codeweavers.com
Thu Apr 21 17:03:21 CDT 2022


This takes advantage of the fact that all of the @Headers parts are
joined with linebreaks.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/web/Submit.pl | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index 9292d387b..ca225b615 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -620,14 +620,13 @@ sub GetHeaderText($)
   }
   if ($self->{Page} == 2 or $self->{Page} == 4)
   {
-    my $HeaderText = "Select the VMs on which you want to run your test.";
+    push @Headers, "Select the VMs on which you want to run your test.";
     my $VMs = CreateVMs();
     $VMs->AddFilter("Status", ["offline", "maintenance"]);
     if (!$VMs->IsEmpty())
     {
-      $HeaderText .= "<br>NOTE: Offline VMs and those undergoing maintenance will not be able to run your tests right away.";
+      push @Headers, "NOTE: Offline VMs and those undergoing maintenance will not be able to run your tests right away.";
     }
-    push @Headers, $HeaderText;
   }
   if (($self->{Page} == 3 or $self->{Page} == 0) and $self->{Impacts})
   {
@@ -652,7 +651,7 @@ sub GetHeaderText($)
       }
       push @TestExecutables, "$ModuleName: ". join(" ", @TestUnits) if (@TestUnits);
     }
-    push @Headers, join("<br>\n", "Here is a list of the test executables impacted by the patch (patched test units, if any, are in italics).", @TestExecutables);
+    push @Headers, "Here is a list of the test executables impacted by the patch (patched test units, if any, are in italics).", @TestExecutables;
   }
 
   return join("<br>\n", @Headers);
-- 
2.30.2



More information about the wine-devel mailing list