From dc39a75b977a52d8b55c8a85bac54609de95aed6 Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Tue, 21 Mar 2017 12:17:08 -0700 Subject: [PATCH] [infra] gcb: support experimental sanitizers format --- infra/gcb/build.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/infra/gcb/build.py b/infra/gcb/build.py index 00239d007..d5690c962 100755 --- a/infra/gcb/build.py +++ b/infra/gcb/build.py @@ -85,6 +85,21 @@ def is_supported_configuration(fuzzing_engine, sanitizer): return sanitizer in ENGINE_INFO[fuzzing_engine].supported_sanitizers +def get_sanitizers(project_yaml): + sanitizers = project_yaml['sanitizers'] + assert isinstance(sanitizers, list) + + processed_sanitizers = [] + for sanitizer in sanitizers: + if isinstance(sanitizer, basestring): + processed_sanitizers.append(sanitizer) + elif isinstance(sanitizer, dict): + for key in sanitizer.iterkeys(): + processed_sanitizers.append(key) + + return processed_sanitizers + + def get_build_steps(project_yaml): name = project_yaml['name'] image = project_yaml['image']