#!/perl/bin/perl
@ARGV;
$BaseDir = $ARGV[0];
#############################################
open (REPORT_FILE, '>>report.html');
print (REPORT_FILE "
\n");
print (REPORT_FILE "\n");
print (REPORT_FILE "Loading International Sites Results");
print (REPORT_FILE "\n");
open (URL_FILE, ')
{
$ThisLine = $_;
chop ($ThisLine);
$url_list[$i] = $ThisLine;
$i += 1;
}
for ($i = 0; $i < 13; $i ++)
{
$count = 0;
open (STDOUT, ">log.txt");
select STDOUT; $| =1;
$temp = $BaseDir;
$temp =~ s/\\/\\\\/g;
use Win32::Process;
use Win32;
$cmdLine = "apprunner $url_list[$i]";
Win32::Process::Create($ProcessObj,
# "c:\\program files\\netscape\\seamonkey\\x86rel\\apprunner.exe",
"$temp.\\apprunner.exe",
$cmdLine,
1,
NORMAL_PRIORITY_CLASS,
# "c:\\program files\\netscape\\seamonkey\\x86rel\\");
"$temp");
sleep (90);
$ProcessObj->GetExitCode( $ExitCode );
$ProcessObj->Kill( $ExitCode );
close (STDOUT);
open (APP_LOG_FILE, '< log.txt');
while ()
{
$ThisLine = $_;
chop ($ThisLine);
if (/loaded successfully/)
{
$count = $count + 1;
}
}
if ($count >= 1)
{
print (REPORT_FILE "\n");
print (REPORT_FILE "@url_list[$i] Loaded Successfully");
print (REPORT_FILE "\n");
print (REPORT_FILE "
\n");
$count = 0;
}
else
{
print (REPORT_FILE "\n");
print (REPORT_FILE "$url_list[$i] NOT Loaded Successfully");
print (REPORT_FILE "\n");
print (REPORT_FILE "
\n");
}
close (APP_LOG_FILE);
}
close (REPORT_FILE);