blob: a8c09b15ce15e450451908e3c1f4fe5705a76d18 [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
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 GetVariables(self, config_name):
# Use env var to optimize build speed on CI
# Force to int, so it's easy to pass in an override.
use_fastbuild = int(os.environ.get('IS_CI', 0))
except (ValueError, TypeError):
use_fastbuild = 0
build_in_docker = int(os.environ.get('IS_DOCKER', 0))
except (ValueError, TypeError):
build_in_docker = 0
variables = {
# This is used to omit large debuginfo in files on CI environment
'cobalt_fastbuild': use_fastbuild,
'cobalt_docker_build': build_in_docker,
# 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 = [
# CORS - 304 checks
# Disabled because of: Flaky on buildbot, proxy unreliability
# 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.
# RequestCache "no-cache" mode revalidates fresh responses found in
# the cache.
# Disabled because of: Caching bug.
# 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.
# Disabled because of: Flaky on buildbot across multiple buildconfigs.
# Non-reproducible with local runs.
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 []