#!/perl use CGI qw(:standard); #/* # * 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): # */ $LogPath = "/log"; $URLRoot = "/log"; $RESULT_FILE = ""; $CURRENT_LOG = ""; $DESCRIPTION_FILE = ""; #Do not modify this line!!! $LogNPath = ""; &CopyLog; exit 0; sub CopyLog{ #Open current log open(DESCR, "$LogPath/$CURRENT_LOG/$DESCRIPTION_FILE"); @LINES1=; ($tmp, $uid) = split(/=/, $LINES1[0]); ($tmp, $description) = split(/=/, $LINES1[1]); close(DESCR); unlink("$LogPath/$CURRENT_LOG/$DESCRIPTION_FILE"); open(FILE, "$LogPath/$CURRENT_LOG/$RESULT_FILE"); @LINES=; $time=localtime(time); $aa = $time; $time=~s/\ |\:/_/g; chomp($uid); $LogNPath=$uid; mkdir("$LogPath/$LogNPath", 0777) || die "cannot mkdir "; open(FILE_LOG, ">$LogPath/$LogNPath/log.html"); print FILE_LOG "\n\nLog for Responsiveness Test of Current Browser for $aa\n"; print FILE_LOG "\n

Responsiveness Tests for Browser

\n

$aa

Unique ID: $uid


\n

DESCRIPTIONS of these tests: $description

\n\n\n"; $SIZE=@LINES; for ($i=0;$i<=$SIZE;$i++) { $_=$LINES[$i]; ($name, $value) = split(/=/, $_); print FILE_LOG "\n"; } print FILE_LOG "
Test nameTime (seconds)
$name
$value
\n"; close FILE; close FILE_LOG; open(FILE_DESCR, ">$LogPath/$LogNPath/$DESCRIPTION_FILE"); print FILE_DESCR @LINES1; print FILE_DESCR "time=$aa"; close FILE_DESCR; 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"); }