@@ -62,10 +62,11 @@ def prepare_benchmark_definitions(args):
6262 ) = get_defaults (defaults_filename )
6363 for usecase_filename in files :
6464 with open (usecase_filename , "r" ) as stream :
65- benchmark_config , test_name = get_final_benchmark_config (
65+ result , benchmark_config , test_name = get_final_benchmark_config (
6666 default_kpis , stream , usecase_filename
6767 )
68- benchmark_definitions [test_name ] = benchmark_config
68+ if result :
69+ benchmark_definitions [test_name ] = benchmark_config
6970 return (
7071 benchmark_definitions ,
7172 default_metrics ,
@@ -109,15 +110,28 @@ def get_defaults(defaults_filename):
109110
110111
111112def get_final_benchmark_config (default_kpis , stream , usecase_filename ):
112- os .path .dirname (os .path .abspath (usecase_filename ))
113- benchmark_config = yaml .safe_load (stream )
114- kpis_keyname = "kpis"
115- if default_kpis is not None :
116- merge_default_and_specific_properties_dict_type (
117- benchmark_config , default_kpis , kpis_keyname , usecase_filename
113+ result = False
114+ benchmark_config = None
115+ test_name = None
116+ try :
117+ os .path .dirname (os .path .abspath (usecase_filename ))
118+ benchmark_config = yaml .safe_load (stream )
119+ kpis_keyname = "kpis"
120+ if default_kpis is not None :
121+ merge_default_and_specific_properties_dict_type (
122+ benchmark_config , default_kpis , kpis_keyname , usecase_filename
123+ )
124+ test_name = benchmark_config ["name" ]
125+ result = True
126+ except Exception as e :
127+ logging .error (
128+ "while loading file {} and error was returned: {}" .format (
129+ usecase_filename , e .__str__ ()
130+ )
118131 )
119- test_name = benchmark_config ["name" ]
120- return benchmark_config , test_name
132+ pass
133+
134+ return result , benchmark_config , test_name
121135
122136
123137def merge_default_and_specific_properties_dict_type (
0 commit comments