Commit c236803a authored by loki@webkit.org's avatar loki@webkit.org
Browse files

2010-01-06 Andras Becsi <abecsi@inf.u-szeged.hu>

        Reviewed by Darin Adler.

        Change hardcoded /tmp in run-webkit-tests to File::Spec->tmpdir(),
        and remove the httpd's pidfile directory if httpd terminated.

        * Scripts/run-webkit-tests:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52853 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d4e2e991
2010-01-06 Andras Becsi <abecsi@inf.u-szeged.hu>
Reviewed by Darin Adler.
Change hardcoded /tmp in run-webkit-tests to File::Spec->tmpdir(),
and remove the httpd's pidfile directory if httpd terminated.
* Scripts/run-webkit-tests:
2010-01-05 Chris Jerdonek <chris.jerdonek@gmail.com>
 
Reviewed by David Levin.
......
......@@ -143,7 +143,10 @@ my $showHelp = 0;
my $stripEditingCallbacks = isCygwin();
my $testHTTP = 1;
my $testMedia = 1;
my $testResultsDirectory = "/tmp/layout-test-results";
my $testResultsDirectory = catfile(File::Spec->tmpdir(), "layout-test-results");
my $layoutTestsSymLink = catfile(File::Spec->tmpdir(), "LayoutTests");
my $httpdPidDir = catfile(File::Spec->tmpdir(), "WebKit");
my $httpdPidFile = catfile($httpdPidDir, "httpd.pid");
my $testsPerDumpTool = 1000;
my $threaded = 0;
# DumpRenderTree has an internal timeout of 15 seconds, so this must be > 15.
......@@ -401,7 +404,7 @@ if ($pixelTests) {
}
}
system "ln", "-s", $testDirectory, "/tmp/LayoutTests" unless -x "/tmp/LayoutTests";
system "ln", "-s", $testDirectory, $layoutTestsSymLink unless -x $layoutTestsSymLink;
my %ignoredFiles = ( "results.html" => 1 );
my %ignoredDirectories = map { $_ => 1 } qw(platform);
......@@ -1349,10 +1352,10 @@ sub openHTTPDIfNeeded()
{
return if $isHttpdOpen;
mkdir "/tmp/WebKit";
mkdir $httpdPidDir;
if (-f "/tmp/WebKit/httpd.pid") {
my $oldPid = `cat /tmp/WebKit/httpd.pid`;
if (-f $httpdPidFile) {
my $oldPid = `cat "$httpdPidFile"`;
chomp $oldPid;
if (0 != kill 0, $oldPid) {
print "\nhttpd is already running: pid $oldPid, killing...\n";
......@@ -1431,7 +1434,18 @@ sub closeHTTPD()
close HTTPDIN;
close HTTPDOUT;
kill 15, `cat /tmp/WebKit/httpd.pid` if -f "/tmp/WebKit/httpd.pid";
return unless -f $httpdPidFile;
my $httpdPid = `cat "$httpdPidFile"`;
kill 15, $httpdPid;
my $retryCount = 20;
while ((0 != kill 0, $httpdPid) && $retryCount) {
sleep 1;
--$retryCount;
}
print STDERR "Timed out waiting for httpd to terminate!\n" unless $retryCount;
rmdir $httpdPidDir;
$isHttpdOpen = 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment