#!/perl # # The contents of this file are subject to the Mozilla Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is Sun Microsystems, # Inc. Portions created by Sun are # Copyright (C) 1999 Sun Microsystems, Inc. All # Rights Reserved. # # Contributor(s): # Client QA Team, St. Petersburg, Russia use CGI qw(:standard); $LogPath = "/log"; $URLRoot = "/log"; $RESULT_FILE = ""; $CURRENT_LOG = ""; #Do not modify this line!!! $LogNPath = ""; &CopyLog; exit 0; sub CopyLog{ #Open current log open(FILE, "$LogPath/$CURRENT_LOG/$RESULT_FILE"); @LINES=; $time=localtime(time); $aa = $time; $time=~s/\ |\:/_/g; mkdir("$LogPath/$time", 0777) || die "cannot mkdir "; $LogNPath=$time; open(FILE_LOG, ">$LogPath/$LogNPath/log.html"); print FILE_LOG "\n\nLog for Test of Webclient for $aa\n"; print FILE_LOG "\n

Manual Tests for Webclient

\n

$aa


\n\n\n"; $SIZE=@LINES; for ($i=0;$i<=$SIZE;$i++) { $_=$LINES[$i]; ($name, $value) = split(/=/, $_); if($value=~/FAILED/) { print FILE_LOG "\n"; }else { print FILE_LOG "\n"; } } print FILE_LOG "
Test nameValue
$name$value
$name$value
\n"; close FILE; close FILE_LOG; open(FILE_RES, ">$LogPath/$LogNPath/$RESULT_FILE"); print FILE_RES @LINES; close FILE_RES; &ExitRedirect(); } ####################################################################### sub ExitRedirect { # Redirect to new log print redirect("$URLRoot/$LogNPath/log.html"); }