This avoids duplication in case the VM names happen to have the same prefix that would be used for the WineTest reports. Also trust the administrator to know what to put in $TagPrefix (i.e. don't lowercase it).
Signed-off-by: Francois Gouget fgouget@codeweavers.com ---
The official TestBot VM names don't have prefixes so I guess this is mostly of use to me but I think there is no harm in having it in the main branch.
My VMs have an 'fgtb' prefix so I can easily distinguish them from the official VMs: for instance fgtbwinxp vs wxppro. But since my $TagPrefix is 'fgtb' this results in tags such as 'fgtb-fgtbwinxp'. This patch ensures the tag is 'fgtb-winxp' which is cleaner and also much less likely to result in a tag that's too long.
testbot/bin/WineRunTask.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index 3290b0bc6..8f5cb268c 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -442,7 +442,8 @@ elsif ($Step->Type eq "suite") { $Keepalive = 60; $Script .= "$FileName "; - my $Tag = lc($TagPrefix) . "-" . lc($VM->Name); + my $Tag = lc($VM->Name); + $Tag =~ s/^$TagPrefix//; $Tag =~ s/[^a-zA-Z0-9]/-/g; if ($VM->Type eq "win64") { @@ -468,7 +469,7 @@ elsif ($Step->Type eq "suite") $Info =~ s/"/\"/g; $Info =~ s/%/%%/g; $Info =~ s/%/%%/g; - $Script .= "-q -o $RptFileName -t $Tag -m "$EMail" -i "$Info"\r\n" . + $Script .= "-q -o $RptFileName -t $TagPrefix-$Tag -m "$EMail" -i "$Info"\r\n". "$FileName -q -s $RptFileName\r\n"; } Debug(Elapsed($Start), " Sending the script: [$Script]\n");