From 958a2f61963151d88c60320fa50e28503796fa14 Mon Sep 17 00:00:00 2001 From: Dongge Liu Date: Fri, 16 Aug 2024 11:08:36 +1000 Subject: [PATCH] Disable incompatible benchmarks for cloud exp --- experiment/run_experiment.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/experiment/run_experiment.py b/experiment/run_experiment.py index e7fa3eaba..ca5e441b2 100644 --- a/experiment/run_experiment.py +++ b/experiment/run_experiment.py @@ -298,6 +298,18 @@ def get_git_hash(allow_uncommitted_changes): return '' +def _filter_incompatible_benchmarks(config: dict, + benchmarks: list[str]) -> list[str]: + """Removes benchmarks that are incompatible with build/run environment.""" + if config['local_experiment']: + return benchmarks + if 'openh264_decoder_fuzzer' in benchmarks: + benchmarks.remove('openh264_decoder_fuzzer') + if 'stb_stbi_read_fuzzer' in benchmarks: + benchmarks.remove('stb_stbi_read_fuzzer') + return benchmarks + + def start_experiment( # pylint: disable=too-many-arguments experiment_name: str, config_filename: str, @@ -322,7 +334,7 @@ def start_experiment( # pylint: disable=too-many-arguments config = read_and_validate_experiment_config(config_filename) config['fuzzers'] = fuzzers - config['benchmarks'] = benchmarks + config['benchmarks'] = _filter_incompatible_benchmarks(config, benchmarks) config['experiment'] = experiment_name config['git_hash'] = get_git_hash(allow_uncommitted_changes) config['no_seeds'] = no_seeds