blob: bd661d45a262b2a1b73c79e173966d3b69ab48e4 [file] [log] [blame]
# Copyright 2017 The Cobalt Authors. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.
"""Base cobalt configuration for GYP."""
import os
import _env # pylint: disable=unused-import
from import paths
import as wb_config
from import application_configuration
from import Config
# The canonical Cobalt application name.
class CobaltConfiguration(application_configuration.ApplicationConfiguration):
"""Base Cobalt configuration class.
Cobalt per-platform configurations, if defined, must subclass from this class.
def __init__(self, platform_configuration, application_name,
self).__init__(platform_configuration, application_name,
def GetVariables(self, config_name):
variables = {
'cobalt_fastbuild': os.environ.get('LB_FASTBUILD', 0),
# This is here rather than cobalt_configuration.gypi so that it's
# available for browser_bindings_gen.gyp.
'enable_debugger': 0 if config_name == Config.GOLD else 1,
# Cobalt uses OpenSSL on all platforms.
'use_openssl': 1,
return variables
def GetPostIncludes(self):
# Insert cobalt_configuration.gypi into the post includes list.
includes = super(CobaltConfiguration, self).GetPostIncludes()
includes[:0] = [os.path.join(paths.BUILD_ROOT, 'cobalt_configuration.gypi')]
return includes
def GetWebPlatformTestFilters(self):
"""Gets all tests to be excluded from a black box test run."""
# Skipped tests on all platforms due to HTTP proxy bugs.
# Tests pass with a direct SSH tunnel.
# Proxy sends out response lines as soon as it gets it without waiting
# for the entire response. It is possible that this causes issues or that
# the proxy has problems sending and terminating a single complete
# response. It may end up sending multiple empty responses.
filters = [
# Late listeners: Preflight.
# Disabled because of: Flaky. Buildbot only failure.
# getResponseHeader: Combined testing of cors response headers.
# Disabled because of: Timeout.
# Status on GET 400, HEAD 401, POST 404, PUT 200.
# Disabled because of: Response status returning 0.
# CORS - status after preflight on POST 401, POST 404, PUT 699.
# Disabled because of: Response status returning 0 or timeout.
# Response reader closed promise should reject after a network error
# happening after resolving fetch promise.
# Disabled because of: Timeout.
# RequestCache "no-store" mode does not store the response in the
# cache with Last-Modified and fresh response.
# Disabled because of: Timeout. Buildbot only failure.
# Check response clone use structureClone for teed ReadableStreams
# (DataViewchunk).
# Disabled because of: Timeout.
# XMLHttpRequest: send() - Basic authenticated CORS request using
# setRequestHeader().
# Disabled because of: Timeout. Buildbot only failure.
# XMLHttpRequest: send() - CORS request with setRequestHeader auth to
# URL accepting Authorization header.
# Disabled because of: False user and password. Buildbot only failure.
# XMLHttpRequest: send() - Redirects (basics) (307).
# Disabled because of: Flaky.
return filters
def GetTestTargets(self):
return [
def GetDefaultTargetBuildFile(self):
return os.path.join(paths.BUILD_ROOT, 'all.gyp')
def WebdriverBenchmarksEnabled(self):
"""Determines if webdriver benchmarks are enabled or not.
True if webdriver benchmarks can run on this platform, False if not.
return False
def GetDefaultSampleSize(self):
return wb_config.STANDARD_SIZE
def GetWebdriverBenchmarksTargetParams(self):
"""Gets command line params to pass to the Cobalt executable."""
return []
def GetWebdriverBenchmarksParams(self):
"""Gets command line params to pass to the webdriver benchmark script."""
return []