Remove Nix files from Tools

https://bugs.webkit.org/show_bug.cgi?id=127418

Reviewed by Csaba Osztrogonác.

* Scripts/build-webkit:
* Scripts/update-webkit-libs-jhbuild:
* Scripts/webkitdirs.pm:
(determineArchitecture):
(argumentsForConfiguration):
(jscProductDir):
(builtDylibPathForName):
(isAppleWebKit):
(launcherPath):
(launcherName):
(checkRequiredSystemConfig):
(copyInspectorFrontendFiles):
(jhbuildWrapperPrefixIfNeeded):
(buildCMakeProjectOrExit):
(cmakeBasedPortName):
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(EflWK2Port.build_webkit_command):
* Scripts/webkitpy/port/factory.py:
(platform_options):
(PortFactory):
* Scripts/webkitpy/port/nix.py: Removed.
* Scripts/webkitpy/port/nix_unittest.py: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9e4b6433
2014-01-22 Jinwoo Song <jinwoo7.song@samsung.com>
Remove Nix files from Tools
https://bugs.webkit.org/show_bug.cgi?id=127418
Reviewed by Csaba Osztrogonác.
* Scripts/build-webkit:
* Scripts/update-webkit-libs-jhbuild:
* Scripts/webkitdirs.pm:
(determineArchitecture):
(argumentsForConfiguration):
(jscProductDir):
(builtDylibPathForName):
(isAppleWebKit):
(launcherPath):
(launcherName):
(checkRequiredSystemConfig):
(copyInspectorFrontendFiles):
(jhbuildWrapperPrefixIfNeeded):
(buildCMakeProjectOrExit):
(cmakeBasedPortName):
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(EflWK2Port.build_webkit_command):
* Scripts/webkitpy/port/factory.py:
(platform_options):
(PortFactory):
* Scripts/webkitpy/port/nix.py: Removed.
* Scripts/webkitpy/port/nix_unittest.py: Removed.
2014-01-21 Benjamin Poulain <benjamin@webkit.org> 2014-01-21 Benjamin Poulain <benjamin@webkit.org>
Add Ian and Ricky to the contributor list Add Ian and Ricky to the contributor list
......
...@@ -64,43 +64,9 @@ my $noWebKit1 = 0; ...@@ -64,43 +64,9 @@ my $noWebKit1 = 0;
my $noWebKit2 = 0; my $noWebKit2 = 0;
my $coverageSupport = 0; my $coverageSupport = 0;
my $startTime = time(); my $startTime = time();
my $curl = 0;
my $opengles2 = 0;
my @features = getFeatureOptionList(); my @features = getFeatureOptionList();
# Update defaults for the Nix port
if (isNix()) {
# Instead of use FeatureList.pm to list enabled features, tell the compiler to
# parse Source/WTF/wtf/Platform.h and get the default values of all feature flags
# from the result.
my $portDefine = "BUILDING_".uc(cmakeBasedPortName())."__";
my $definitions = `gcc -E -P -dM -D$portDefine -I Source/WTF Source/WTF/wtf/Platform.h | grep '^#define ENABLE_\\w\\+ \[01\]\$\\|^#define WTF_USE_\\w\\+ \[01\]\$' | cut -d' ' -f2-3`;
my %featureDefaults;
foreach (split(/\n/, $definitions)) {
my @macroDefinition = split(/ /);
$featureDefaults{$macroDefinition[0]} = $macroDefinition[1];
}
@features = ();
foreach (sort keys %featureDefaults) {
next if (!/^ENABLE/);
my $optionName = lc $_;
$optionName =~ s/^enable_//;
$optionName =~ s/_/-/g;
my $descName = $optionName;
$descName =~ s/-/ /g;
push @features, {
option => $optionName,
desc => "Toggle $descName support",
define => $_,
default => $featureDefaults{$_}
};
}
}
# Additional environment parameters # Additional environment parameters
push @ARGV, split(/ /, $ENV{'BUILD_WEBKIT_ARGS'}) if ($ENV{'BUILD_WEBKIT_ARGS'}); push @ARGV, split(/ /, $ENV{'BUILD_WEBKIT_ARGS'}) if ($ENV{'BUILD_WEBKIT_ARGS'});
...@@ -129,7 +95,6 @@ Usage: $programName [options] [options to pass to build system] ...@@ -129,7 +95,6 @@ Usage: $programName [options] [options to pass to build system]
--coverage Enable Code Coverage support (Mac only) --coverage Enable Code Coverage support (Mac only)
--efl Build the EFL port --efl Build the EFL port
--nix Build the Nix port
--gtk Build the GTK+ port --gtk Build the GTK+ port
--wincairo Build using Cairo (rather than CoreGraphics) on Windows --wincairo Build using Cairo (rather than CoreGraphics) on Windows
--wince Build the WinCE port --wince Build the WinCE port
...@@ -146,9 +111,6 @@ Usage: $programName [options] [options to pass to build system] ...@@ -146,9 +111,6 @@ Usage: $programName [options] [options to pass to build system]
--no-webkit1 Omit WebKit1 code from the build (EFL/GTK only) --no-webkit1 Omit WebKit1 code from the build (EFL/GTK only)
--no-webkit2 Omit WebKit2 code from the build --no-webkit2 Omit WebKit2 code from the build
--curl Use libCurl as network backend (Nix only)
--opengles2 Use EGL and OpenGLES2 instead of GLX (Nix only)
EOF EOF
my %options = ( my %options = (
...@@ -164,8 +126,6 @@ my %options = ( ...@@ -164,8 +126,6 @@ my %options = (
'no-webkit1' => \$noWebKit1, 'no-webkit1' => \$noWebKit1,
'no-webkit2' => \$noWebKit2, 'no-webkit2' => \$noWebKit2,
'coverage' => \$coverageSupport, 'coverage' => \$coverageSupport,
'curl' => \$curl,
'opengles2' => \$opengles2,
); );
# Build usage text and options list from features # Build usage text and options list from features
...@@ -292,24 +252,6 @@ if (isInspectorFrontend()) { ...@@ -292,24 +252,6 @@ if (isInspectorFrontend()) {
@projects = ("Source/WebInspectorUI"); @projects = ("Source/WebInspectorUI");
} }
if (isNix()) {
if ($noWebKit2) {
print STDERR "Nix is a WebKit2 port, you can't disable WebKit2 on it!\n";
exit 1;
}
# By default we build using all of the available CPUs.
$makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
$cmakeArgs = "-DWTF_USE_CURL=ON " . $cmakeArgs if $curl;
$cmakeArgs = "-DWTF_USE_OPENGL_ES_2=ON " . $cmakeArgs if $opengles2;
# We remove CMakeCache to avoid the bots to reuse cached flags when
# we enable new features. This forces a reconfiguration.
removeCMakeCache();
buildCMakeProjectOrExit($clean, "Nix", $prefixPath, $makeArgs, (cmakeBasedPortArguments(), cMakeArgsFromFeatures()), $cmakeArgs);
}
if (isEfl() || isGtkCMake()) { if (isEfl() || isGtkCMake()) {
# By default we build using all of the available CPUs. # By default we build using all of the available CPUs.
$makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/; $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
......
...@@ -24,17 +24,15 @@ use Getopt::Long qw(:config pass_through); ...@@ -24,17 +24,15 @@ use Getopt::Long qw(:config pass_through);
my $platformEfl = 0; my $platformEfl = 0;
my $platformGtk = 0; my $platformGtk = 0;
my $platformNix = 0;
my $getOptionsResult = GetOptions( my $getOptionsResult = GetOptions(
'efl' => \$platformEfl, 'efl' => \$platformEfl,
'gtk' => \$platformGtk, 'gtk' => \$platformGtk,
'nix' => \$platformNix
); );
my $platform = ""; my $platform = "";
if (!$getOptionsResult) { if (!$getOptionsResult) {
die "No platform specified for " . basename($0) .". Use --gtk, --efl or --nix.\n"; die "No platform specified for " . basename($0) .". Use --gtk or --efl.\n";
} else { } else {
if ($platformEfl) { if ($platformEfl) {
$platform = "efl"; $platform = "efl";
...@@ -42,9 +40,6 @@ if (!$getOptionsResult) { ...@@ -42,9 +40,6 @@ if (!$getOptionsResult) {
if ($platformGtk) { if ($platformGtk) {
$platform = "gtk"; $platform = "gtk";
} }
if ($platformNix) {
$platform = "nix";
}
} }
sub getMD5HashForFile($) sub getMD5HashForFile($)
...@@ -126,7 +121,7 @@ delete $ENV{AR_FLAGS} if exists $ENV{AR_FLAGS}; ...@@ -126,7 +121,7 @@ delete $ENV{AR_FLAGS} if exists $ENV{AR_FLAGS};
chdir(relativeScriptsDir() . "/../jhbuild") or die $!; chdir(relativeScriptsDir() . "/../jhbuild") or die $!;
my %prettyPlatform = ( "efl" => "EFL", "gtk" => "GTK+", "nix" => "Nix" ); my %prettyPlatform = ( "efl" => "EFL", "gtk" => "GTK+" );
if (-e getJhbuildPath() && jhbuildConfigurationChanged()) { if (-e getJhbuildPath() && jhbuildConfigurationChanged()) {
cleanJhbuild(); cleanJhbuild();
......
...@@ -96,7 +96,6 @@ my $isWinCE; ...@@ -96,7 +96,6 @@ my $isWinCE;
my $isWinCairo; my $isWinCairo;
my $isWin64; my $isWin64;
my $isEfl; my $isEfl;
my $isNix;
my $isInspectorFrontend; my $isInspectorFrontend;
my $isWK2; my $isWK2;
my $shouldTargetWebProcess; my $shouldTargetWebProcess;
...@@ -311,7 +310,7 @@ sub determineArchitecture ...@@ -311,7 +310,7 @@ sub determineArchitecture
$architecture = 'armv7'; $architecture = 'armv7';
} }
} }
} elsif (isEfl() || isNix() || isGtkCMake()) { } elsif (isEfl() || isGtkCMake()) {
my $host_processor = ""; my $host_processor = "";
$host_processor = `cmake --system-information | grep CMAKE_SYSTEM_PROCESSOR`; $host_processor = `cmake --system-information | grep CMAKE_SYSTEM_PROCESSOR`;
if ($host_processor =~ m/^CMAKE_SYSTEM_PROCESSOR \"([^"]+)\"/) { if ($host_processor =~ m/^CMAKE_SYSTEM_PROCESSOR \"([^"]+)\"/) {
...@@ -321,13 +320,13 @@ sub determineArchitecture ...@@ -321,13 +320,13 @@ sub determineArchitecture
} }
} }
if (!$architecture && (isGtk() || isAppleMacWebKit() || isEfl() || isNix())) { if (!$architecture && (isGtk() || isAppleMacWebKit() || isEfl())) {
# Fall back to output of `arch', if it is present. # Fall back to output of `arch', if it is present.
$architecture = `arch`; $architecture = `arch`;
chomp $architecture; chomp $architecture;
} }
if (!$architecture && (isGtk() || isAppleMacWebKit() || isEfl() || isNix())) { if (!$architecture && (isGtk() || isAppleMacWebKit() || isEfl())) {
# Fall back to output of `uname -m', if it is present. # Fall back to output of `uname -m', if it is present.
$architecture = `uname -m`; $architecture = `uname -m`;
chomp $architecture; chomp $architecture;
...@@ -377,7 +376,6 @@ sub argumentsForConfiguration() ...@@ -377,7 +376,6 @@ sub argumentsForConfiguration()
push(@args, '--gtk') if isGtkAutotools(); push(@args, '--gtk') if isGtkAutotools();
push(@args, '--gtkcmake') if isGtkCMake(); push(@args, '--gtkcmake') if isGtkCMake();
push(@args, '--efl') if isEfl(); push(@args, '--efl') if isEfl();
push(@args, '--nix') if isNix();
push(@args, '--wincairo') if isWinCairo(); push(@args, '--wincairo') if isWinCairo();
push(@args, '--wince') if isWinCE(); push(@args, '--wince') if isWinCE();
push(@args, '--inspector-frontend') if isInspectorFrontend(); push(@args, '--inspector-frontend') if isInspectorFrontend();
...@@ -541,7 +539,7 @@ sub productDir ...@@ -541,7 +539,7 @@ sub productDir
sub jscProductDir sub jscProductDir
{ {
my $productDir = productDir(); my $productDir = productDir();
$productDir .= "/bin" if (isEfl() || isNix() || isGtkCMake()); $productDir .= "/bin" if (isEfl() || isGtkCMake());
$productDir .= "/Programs" if isGtkAutotools(); $productDir .= "/Programs" if isGtkAutotools();
return $productDir; return $productDir;
...@@ -804,9 +802,6 @@ sub builtDylibPathForName ...@@ -804,9 +802,6 @@ sub builtDylibPathForName
} }
return "$configurationProductDir/lib/libewebkit.so"; return "$configurationProductDir/lib/libewebkit.so";
} }
if (isNix()) {
return "$configurationProductDir/lib/libWebKitNix.so";
}
if (isWinCE()) { if (isWinCE()) {
return "$configurationProductDir/$libraryName"; return "$configurationProductDir/$libraryName";
} }
...@@ -941,18 +936,6 @@ sub isGtkCMake() ...@@ -941,18 +936,6 @@ sub isGtkCMake()
return $isGtkCMake; return $isGtkCMake;
} }
sub determineIsNix()
{
return if defined($isNix);
$isNix = checkForArgumentAndRemoveFromARGV("--nix");
}
sub isNix()
{
determineIsNix();
return $isNix;
}
sub isGtkAutotools() sub isGtkAutotools()
{ {
determineIsGtkAutotools(); determineIsGtkAutotools();
...@@ -1108,7 +1091,7 @@ sub isCrossCompilation() ...@@ -1108,7 +1091,7 @@ sub isCrossCompilation()
sub isAppleWebKit() sub isAppleWebKit()
{ {
return !(isGtk() or isEfl() or isWinCE() or isNix()); return !(isGtk() or isEfl() or isWinCE());
} }
sub isAppleMacWebKit() sub isAppleMacWebKit()
...@@ -1299,7 +1282,7 @@ sub relativeScriptsDir() ...@@ -1299,7 +1282,7 @@ sub relativeScriptsDir()
sub launcherPath() sub launcherPath()
{ {
my $relativeScriptsPath = relativeScriptsDir(); my $relativeScriptsPath = relativeScriptsDir();
if (isGtk() || isEfl() || isWinCE() || isNix()) { if (isGtk() || isEfl() || isWinCE()) {
return "$relativeScriptsPath/run-launcher"; return "$relativeScriptsPath/run-launcher";
} elsif (isAppleWebKit()) { } elsif (isAppleWebKit()) {
return "$relativeScriptsPath/run-safari"; return "$relativeScriptsPath/run-safari";
...@@ -1316,8 +1299,6 @@ sub launcherName() ...@@ -1316,8 +1299,6 @@ sub launcherName()
return "EWebLauncher/MiniBrowser"; return "EWebLauncher/MiniBrowser";
} elsif (isWinCE()) { } elsif (isWinCE()) {
return "WinCELauncher"; return "WinCELauncher";
} elsif (isNix()) {
return "MiniBrowser";
} }
} }
...@@ -1340,7 +1321,7 @@ sub checkRequiredSystemConfig ...@@ -1340,7 +1321,7 @@ sub checkRequiredSystemConfig
print "most likely fail. The latest Xcode is available from the App Store.\n"; print "most likely fail. The latest Xcode is available from the App Store.\n";
print "*************************************************************\n"; print "*************************************************************\n";
} }
} elsif (isGtk() or isEfl() or isWindows() or isNix()) { } elsif (isGtk() or isEfl() or isWindows()) {
my @cmds = qw(bison gperf flex); my @cmds = qw(bison gperf flex);
my @missing = (); my @missing = ();
my $oldPath = $ENV{PATH}; my $oldPath = $ENV{PATH};
...@@ -1567,7 +1548,7 @@ sub copyInspectorFrontendFiles ...@@ -1567,7 +1548,7 @@ sub copyInspectorFrontendFiles
} }
} elsif (isAppleWinWebKit() || isWinCairo()) { } elsif (isAppleWinWebKit() || isWinCairo()) {
$inspectorResourcesDirPath = $productDir . "/WebKit.resources/inspector"; $inspectorResourcesDirPath = $productDir . "/WebKit.resources/inspector";
} elsif (isGtk() || isNix()) { } elsif (isGtk()) {
my $prefix = $ENV{"WebKitInstallationPrefix"}; my $prefix = $ENV{"WebKitInstallationPrefix"};
$inspectorResourcesDirPath = (defined($prefix) ? $prefix : "/usr/share") . "/webkit-1.0/webinspector"; $inspectorResourcesDirPath = (defined($prefix) ? $prefix : "/usr/share") . "/webkit-1.0/webinspector";
} elsif (isEfl()) { } elsif (isEfl()) {
...@@ -1883,8 +1864,6 @@ sub jhbuildWrapperPrefixIfNeeded() ...@@ -1883,8 +1864,6 @@ sub jhbuildWrapperPrefixIfNeeded()
push(@prefix, "--efl"); push(@prefix, "--efl");
} elsif (isGtk()) { } elsif (isGtk()) {
push(@prefix, "--gtk"); push(@prefix, "--gtk");
} elsif (isNix()) {
push(@prefix, "--nix");
} }
push(@prefix, "run"); push(@prefix, "run");
...@@ -1979,10 +1958,6 @@ sub buildCMakeProjectOrExit($$$$@) ...@@ -1979,10 +1958,6 @@ sub buildCMakeProjectOrExit($$$$@)
system("perl", "$sourceDir/Tools/Scripts/update-webkitefl-libs") == 0 or die $!; system("perl", "$sourceDir/Tools/Scripts/update-webkitefl-libs") == 0 or die $!;
} }
if (isNix() && checkForArgumentAndRemoveFromARGV("--update-nix")) {
system("perl", "$sourceDir/Tools/Scripts/update-webkitnix-libs") == 0 or die $!;
}
$returnCode = exitStatus(generateBuildSystemFromCMakeProject($port, $prefixPath, @cmakeArgs)); $returnCode = exitStatus(generateBuildSystemFromCMakeProject($port, $prefixPath, @cmakeArgs));
exit($returnCode) if $returnCode; exit($returnCode) if $returnCode;
...@@ -2001,7 +1976,6 @@ sub cmakeBasedPortName() ...@@ -2001,7 +1976,6 @@ sub cmakeBasedPortName()
{ {
return "Efl" if isEfl(); return "Efl" if isEfl();
return "WinCE" if isWinCE(); return "WinCE" if isWinCE();
return "Nix" if isNix();
return "GTK" if isGtkCMake(); return "GTK" if isGtkCMake();
return ""; return "";
} }
......
...@@ -71,7 +71,6 @@ class DeprecatedPort(object): ...@@ -71,7 +71,6 @@ class DeprecatedPort(object):
"qt-wk2": QtWK2Port, "qt-wk2": QtWK2Port,
"efl": EflPort, "efl": EflPort,
"efl-wk2": EflWK2Port, "efl-wk2": EflWK2Port,
"nix": NixPort,
} }
default_port = { default_port = {
"Windows": WinPort, "Windows": WinPort,
...@@ -232,14 +231,3 @@ class EflWK2Port(DeprecatedPort): ...@@ -232,14 +231,3 @@ class EflWK2Port(DeprecatedPort):
command.append("--no-webkit1") command.append("--no-webkit1")
command.append(super(EflWK2Port, self).makeArgs()) command.append(super(EflWK2Port, self).makeArgs())
return command return command
class NixPort(DeprecatedPort):
port_flag_name = "nix"
def build_webkit_command(self, build_style=None):
command = super(NixPort, self).build_webkit_command(build_style=build_style)
command.append("--nix")
command.append("--update-nix")
command.append(super(NixPort, self).makeArgs())
return command
...@@ -47,8 +47,6 @@ def platform_options(use_globs=False): ...@@ -47,8 +47,6 @@ def platform_options(use_globs=False):
optparse.make_option('--efl', action='store_const', dest='platform', optparse.make_option('--efl', action='store_const', dest='platform',
const=('efl*' if use_globs else 'efl'), const=('efl*' if use_globs else 'efl'),
help=('Alias for --platform=efl*' if use_globs else 'Alias for --platform=efl')), help=('Alias for --platform=efl*' if use_globs else 'Alias for --platform=efl')),
optparse.make_option('--nix', action='store_const', dest='platform',
const=('nix'), help=('Alias for --platform=nix')),
optparse.make_option('--gtk', action='store_const', dest='platform', optparse.make_option('--gtk', action='store_const', dest='platform',
const=('gtk*' if use_globs else 'gtk'), const=('gtk*' if use_globs else 'gtk'),
help=('Alias for --platform=gtk*' if use_globs else 'Alias for --platform=gtk')), help=('Alias for --platform=gtk*' if use_globs else 'Alias for --platform=gtk')),
...@@ -78,7 +76,6 @@ def _builder_options(builder_name): ...@@ -78,7 +76,6 @@ def _builder_options(builder_name):
class PortFactory(object): class PortFactory(object):
PORT_CLASSES = ( PORT_CLASSES = (
'efl.EflPort', 'efl.EflPort',
'nix.NixPort',
'gtk.GtkPort', 'gtk.GtkPort',
'mac.MacPort', 'mac.MacPort',
'mock_drt.MockDRTPort', 'mock_drt.MockDRTPort',
......
# Copyright (C) 2011 ProFUSION Embedded Systems. All rights reserved.
# Copyright (C) 2011 Samsung Electronics. All rights reserved.
# Copyright (C) 2012 Intel Corporation
# Copyright (C) 2012, 2013 Nokia Corporation and/or its subsidiary(-ies).
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""WebKit Nix implementation of the Port interface."""
import os
from webkitpy.layout_tests.models.test_configuration import TestConfiguration
from webkitpy.port.base import Port
from webkitpy.port.pulseaudio_sanitizer import PulseAudioSanitizer
class NixPort(Port):
port_name = 'nix'
def _wk2_port_name(self):
return 'nix'
@classmethod
def determine_full_port_name(cls, host, options, port_name):
"""Determine the port name based on host and options values."""
# Currently the only "port" instance supported by Nix is "nix". Reimplementing
# this method avoids changing port name to nix-wk2, which is the default
# behavior in base.py.
return port_name
def __init__(self, *args, **kwargs):
super(NixPort, self).__init__(*args, **kwargs)
self._jhbuild_wrapper_path = [self.path_from_webkit_base('Tools', 'jhbuild', 'jhbuild-wrapper'), '--nix', 'run']
self.set_option_default('wrapper', ' '.join(self._jhbuild_wrapper_path))
self.set_option_default('webkit_test_runner', True)
self.webprocess_cmd_prefix = self.get_option('webprocess_cmd_prefix')
self._pulseaudio_sanitizer = PulseAudioSanitizer()
def _port_flag_for_scripts(self):
return "--nix"
def setup_test_run(self):
self._pulseaudio_sanitizer.unload_pulseaudio_module()
def setup_environ_for_server(self, server_name=None):
env = super(NixPort, self).setup_environ_for_server(server_name)
# If DISPLAY environment variable is unset in the system
# e.g. on build bot, remove DISPLAY variable from the dictionary
if not 'DISPLAY' in os.environ:
del env['DISPLAY']
env['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('lib', 'libTestRunnerInjectedBundle.so')
env['TEST_RUNNER_PLUGIN_PATH'] = self._build_path('lib')
if self.webprocess_cmd_prefix:
env['WEB_PROCESS_CMD_PREFIX'] = self.webprocess_cmd_prefix
return env
def default_timeout_ms(self):
# Tests run considerably slower under gdb
# or valgrind.
if self.get_option('webprocess_cmd_prefix'):
return 350 * 1000
return super(NixPort, self).default_timeout_ms()
def clean_up_test_run(self):
super(NixPort, self).clean_up_test_run()
self._pulseaudio_sanitizer.restore_pulseaudio_module()
def _generate_all_test_configurations(self):
return [TestConfiguration(version=self._version, architecture='x86', build_type=build_type) for build_type in self.ALL_BUILD_TYPES]
def _path_to_driver(self):
return self._build_path('bin', self.driver_name())
def _path_to_image_diff(self):
return self._build_path('bin', 'ImageDiff')
def _image_diff_command(self, *args, **kwargs):
return self._jhbuild_wrapper_path + super(NixPort, self)._image_diff_command(*args, **kwargs)
def _search_paths(self):
return [self.port_name]
def show_results_html_file(self, results_filename):
run_launcher_args = ["file://%s" % results_filename]
self._run_script("run-launcher", run_launcher_args)
def _port_specific_expectations_files(self):
paths = self._search_paths()
if self.get_option('webkit_test_runner'):
paths.append('wk2')
return list(([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in paths]))
def default_baseline_search_path(self):
return map(self._webkit_baseline_path, ['nix', 'wk2'])
# Copyright (C) 2012, 2013 Nokia Corporation and/or its subsidiary(-ies).
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE