@@ -179,6 +179,7 @@ def __init__(self,
179
179
_opts_mut_reset_type = None ,
180
180
_opts_jobs = None ,
181
181
_opts_waterfall_test = None ,
182
+ _opts_consolidate_waterfall_test = None ,
182
183
_opts_extend_test_timeout = None ):
183
184
""" Let's try hard to init this object
184
185
"""
@@ -236,6 +237,7 @@ def __init__(self,
236
237
self .opts_mut_reset_type = _opts_mut_reset_type
237
238
self .opts_jobs = _opts_jobs if _opts_jobs is not None else 1
238
239
self .opts_waterfall_test = _opts_waterfall_test
240
+ self .opts_consolidate_waterfall_test = _opts_consolidate_waterfall_test
239
241
self .opts_extend_test_timeout = _opts_extend_test_timeout
240
242
self .opts_clean = _clean
241
243
@@ -540,7 +542,15 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
540
542
if target not in self .test_summary_ext [toolchain ][target ]:
541
543
if test_id not in self .test_summary_ext [toolchain ][target ]:
542
544
self .test_summary_ext [toolchain ][target ][test_id ] = []
543
- self .test_summary_ext [toolchain ][target ][test_id ].append (detailed_test_results )
545
+
546
+ append_test_result = detailed_test_results
547
+
548
+ # If waterfall and consolidate-waterfall options are enabled,
549
+ # only include the last test result in the report.
550
+ if self .opts_waterfall_test and self .opts_consolidate_waterfall_test :
551
+ append_test_result = {0 : detailed_test_results [len (detailed_test_results ) - 1 ]}
552
+
553
+ self .test_summary_ext [toolchain ][target ][test_id ].append (append_test_result )
544
554
545
555
test_suite_properties ['skipped' ] = ', ' .join (test_suite_properties ['skipped' ])
546
556
self .test_suite_properties_ext [target ][toolchain ] = test_suite_properties
@@ -1838,6 +1848,12 @@ def get_default_test_options_parser():
1838
1848
dest = 'test_global_loops_value' ,
1839
1849
help = 'Set global number of test loops per test. Default value is set 1' )
1840
1850
1851
+ parser .add_option ('' , '--consolidate-waterfall' ,
1852
+ dest = 'consolidate_waterfall_test' ,
1853
+ default = False ,
1854
+ action = "store_true" ,
1855
+ help = 'Used with --waterfall option. Adds only one test to report reflecting outcome of waterfall test.' )
1856
+
1841
1857
parser .add_option ('-W' , '--waterfall' ,
1842
1858
dest = 'waterfall_test' ,
1843
1859
default = False ,
0 commit comments