mirror of https://github.com/google/oss-fuzz.git
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.
This commit is contained in:
parent
82252c22ef
commit
b74211ecf9
|
@ -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} '
|
||||
|
|
|
@ -23,6 +23,7 @@ PROJECT_DIR=$SRC/wasmtime
|
|||
cd $PROJECT_DIR/fuzz && cargo fuzz build -O --debug-assertions --all-features
|
||||
|
||||
FUZZ_TARGET_OUTPUT_DIR=$PROJECT_DIR/target/x86_64-unknown-linux-gnu/release
|
||||
|
||||
for f in $SRC/wasmtime/fuzz/fuzz_targets/*.rs
|
||||
do
|
||||
FUZZ_TARGET_NAME=$(basename ${f%.*})
|
||||
|
|
Loading…
Reference in New Issue