[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
weinig at apple.com
weinig at apple.com
Fri Jan 21 14:52:18 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 708c22f94bc3fe3b68940953538f7e8ae0c9a434
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 3 18:40:55 2011 +0000
Make run-api-tests less chatty.
https://bugs.webkit.org/show_bug.cgi?id=51831
Reviewed by Anders Carlsson.
- Make script quiet by default and add --verbose option (replacing --quiet).
- When not verbose, pipe stdout and stderr to devnull.
* Scripts/run-api-tests:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 01bbb28..1b46228 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,15 @@
+2011-01-03 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Make run-api-tests less chatty.
+ https://bugs.webkit.org/show_bug.cgi?id=51831
+
+ - Make script quiet by default and add --verbose option (replacing --quiet).
+ - When not verbose, pipe stdout and stderr to devnull.
+
+ * Scripts/run-api-tests:
+
2011-01-03 Pratik Solanki <psolanki at apple.com>
Unreviewed. Adding myself to committers.py.
diff --git a/Tools/Scripts/run-api-tests b/Tools/Scripts/run-api-tests
index 29430a8..b8d388d 100755
--- a/Tools/Scripts/run-api-tests
+++ b/Tools/Scripts/run-api-tests
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (C) 2010 Apple Inc. All rights reserved.
+# Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -46,20 +46,20 @@ sub populateTests();
sub buildTestTool();
my $showHelp = 0;
-my $quiet = 0;
+my $verbose = 0;
my $dump = 0;
my $programName = basename($0);
my $usage = <<EOF;
Usage: $programName [options]
--help Show this help message
- -q|--quite Less verbose output
+ -v|--verbose Verbose output
-d|--dump-tests Dump the names of testcases without running them
EOF
GetOptions(
'help' => \$showHelp,
- 'quiet|q' => \$quiet,
+ 'verbose|v' => \$verbose,
'dump|d' => \$dump,
);
@@ -132,11 +132,32 @@ sub runTest($$)
$ENV{DYLD_FRAMEWORK_PATH} = $productDir;
$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
my $apiTesterPath = "$productDir/TestWebKitAPI";
+
+ local *DEVNULL;
+ my ($childIn, $childOut, $childErr);
+ unless ($verbose) {
+ open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null";
+ $childOut = ">&DEVNULL";
+ $childErr = ">&DEVNULL";
+ } else {
+ $childOut = ">&STDOUT";
+ $childErr = ">&STDERR";
+ }
+
+ my $pid;
if (architecture()) {
- $result = system "arch", "-" . architecture(), $apiTesterPath, $test, @ARGV;
+ $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), $apiTesterPath, $test, @ARGV) or die "Failed to run test: $test.";
} else {
- $result = system $apiTesterPath, $test, @ARGV;
+ $pid = open3($childIn, $childOut, $childErr, $apiTesterPath, $test, @ARGV) or die "Failed to run test: $test.";
}
+
+ close($childIn);
+ close($childOut);
+ close($childErr);
+ close(DEVNULL) unless ($verbose);
+
+ waitpid($pid, 0);
+ my $result = $?;
} elsif (isAppleWinWebKit()) {
my $apiTesterNameSuffix;
if (configurationForVisualStudio() ne "Debug_All") {
@@ -168,15 +189,27 @@ sub populateTests()
$ENV{WEBKIT_UNSET_DYLD_FRAMEWORK_PATH} = "YES";
my $apiTesterPath = "$productDir/TestWebKitAPI";
- my ($pid, $childIn, $childOut);
+ local *DEVNULL;
+ my ($childIn, $childOut, $childErr);
+ unless ($verbose) {
+ open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null";
+ $childErr = ">&DEVNULL";
+ } else {
+ $childErr = ">&STDERR";
+ }
+
+ my $pid;
if (architecture()) {
- $pid = open3($childIn, $childOut, ">&STDERR", "arch", "-" . architecture(), $apiTesterPath, "--dump-tests") or die "Failed to build list of tests!";
+ $pid = open3($childIn, $childOut, $childErr, "arch", "-" . architecture(), $apiTesterPath, "--dump-tests") or die "Failed to build list of tests!";
} else {
- $pid = open3($childIn, $childOut, ">&STDERR", $apiTesterPath, "--dump-tests") or die "Failed to build list of tests!";
+ $pid = open3($childIn, $childOut, $childErr, $apiTesterPath, "--dump-tests") or die "Failed to build list of tests!";
}
+
close($childIn);
@tests = <$childOut>;
close($childOut);
+ close($childErr);
+ close(DEVNULL) unless ($verbose);
waitpid($pid, 0);
my $result = $?;
@@ -219,7 +252,7 @@ sub buildTestTool()
local *DEVNULL;
my ($childIn, $childOut, $childErr);
- if ($quiet) {
+ unless ($verbose) {
open(DEVNULL, ">", File::Spec->devnull()) or die "Failed to open /dev/null";
$childOut = ">&DEVNULL";
$childErr = ">&DEVNULL";
@@ -231,13 +264,14 @@ sub buildTestTool()
my @args = argumentsForConfiguration();
my $buildProcess = open3($childIn, $childOut, $childErr, "Tools/Scripts/$buildTestTool", @args) or die "Failed to run " . $buildTestTool;
+
close($childIn);
- waitpid $buildProcess, 0;
- my $buildResult = $?;
close($childOut);
close($childErr);
+ close(DEVNULL) unless ($verbose);
- close DEVNULL if ($quiet);
+ waitpid($buildProcess, 0);
+ my $buildResult = $?;
if ($buildResult) {
print STDERR "Compiling TestWebKitAPI failed!\n";
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list