aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/ci
diff options
context:
space:
mode:
authorGravatar Abhishek Arya <inferno@chromium.org>2020-07-06 13:13:02 -0700
committerGravatar GitHub <noreply@github.com>2020-07-06 13:13:02 -0700
commitb74211ecf917a0d2fbec9b74d4baa59ab44a855a (patch)
tree726ea672606b2947bd1daf8320eab48ee333c0de /infra/ci
parent82252c22efbea9215137912c53e0c8c0b442273b (diff)
Skip coverage build in CI for non C/C++ projects. (#4075)
* Skip coverage build in CI for non C/C++ projects. Fixes https://github.com/google/oss-fuzz/issues/4074 * Test wasmtime.
Diffstat (limited to 'infra/ci')
-rwxr-xr-xinfra/ci/build.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/infra/ci/build.py b/infra/ci/build.py
index 98624d46..7d695aca 100755
--- a/infra/ci/build.py
+++ b/infra/ci/build.py
@@ -28,6 +28,9 @@ DEFAULT_ARCHITECTURES = ['x86_64']
DEFAULT_ENGINES = ['afl', 'honggfuzz', 'libfuzzer']
DEFAULT_SANITIZERS = ['address', 'undefined']
+# Languages from project.yaml that have code coverage support.
+LANGUAGES_WITH_COVERAGE_SUPPORT = ['c', 'c++']
+
def get_modified_buildable_projects():
"""Returns a list of all the projects modified in this commit that have a
@@ -112,6 +115,14 @@ def build_project(project):
engine = os.getenv('ENGINE')
sanitizer = os.getenv('SANITIZER')
architecture = os.getenv('ARCHITECTURE')
+ language = project_yaml.get('language')
+
+ if (sanitizer == 'coverage' and
+ language not in LANGUAGES_WITH_COVERAGE_SUPPORT):
+ print(('Project "{project}" is written in "{language}", '
+ 'coverage is not supported yet.').format(project=project,
+ language=language))
+ return
if sanitizer != 'coverage' and not should_build(project_yaml):
print(('Specified build: engine: {0}, sanitizer: {1}, architecture: {2} '