@@ -162,6 +162,8 @@ def __init__(self,
162
162
_opts_report_html_file_name = None ,
163
163
_opts_report_junit_file_name = None ,
164
164
_opts_report_build_file_name = None ,
165
+ _opts_build_report = {},
166
+ _opts_build_properties = {},
165
167
_test_spec = {},
166
168
_opts_goanna_for_mbed_sdk = None ,
167
169
_opts_goanna_for_tests = None ,
@@ -185,7 +187,8 @@ def __init__(self,
185
187
_opts_waterfall_test = None ,
186
188
_opts_consolidate_waterfall_test = None ,
187
189
_opts_extend_test_timeout = None ,
188
- _opts_auto_detect = None ):
190
+ _opts_auto_detect = None ,
191
+ _opts_include_non_automated = False ):
189
192
""" Let's try hard to init this object
190
193
"""
191
194
from colorama import init
@@ -241,6 +244,10 @@ def __init__(self,
241
244
self .opts_extend_test_timeout = _opts_extend_test_timeout
242
245
self .opts_clean = _clean
243
246
self .opts_auto_detect = _opts_auto_detect
247
+ self .opts_include_non_automated = _opts_include_non_automated
248
+
249
+ self .build_report = _opts_build_report
250
+ self .build_properties = _opts_build_properties
244
251
245
252
# File / screen logger initialization
246
253
self .logger = CLITestLogger (file_name = self .opts_log_file_name ) # Default test logger
@@ -382,7 +389,7 @@ def execute_thread_slice(self, q, target, toolchains, clean, test_ids, build_rep
382
389
self .db_logger .update_build_id_info (self .db_logger_build_id , _extra = json .dumps (self .dump_options ()))
383
390
self .db_logger .disconnect ();
384
391
385
- valid_test_map_keys = self .get_valid_tests (test_map_keys , target , toolchain , test_ids )
392
+ valid_test_map_keys = self .get_valid_tests (test_map_keys , target , toolchain , test_ids , self . opts_include_non_automated )
386
393
skipped_test_map_keys = self .get_skipped_tests (test_map_keys , valid_test_map_keys )
387
394
388
395
for skipped_test_id in skipped_test_map_keys :
@@ -560,8 +567,6 @@ def execute(self):
560
567
if self .opts_shuffle_test_seed is not None and self .is_shuffle_seed_float ():
561
568
self .shuffle_random_seed = round (float (self .opts_shuffle_test_seed ), self .SHUFFLE_SEED_ROUND )
562
569
563
- build_report = {}
564
- build_properties = {}
565
570
566
571
if self .opts_parallel_test_exec :
567
572
###################################################################
@@ -575,7 +580,7 @@ def execute(self):
575
580
# get information about available MUTs (per target).
576
581
for target , toolchains in self .test_spec ['targets' ].iteritems ():
577
582
self .test_suite_properties_ext [target ] = {}
578
- t = threading .Thread (target = self .execute_thread_slice , args = (q , target , toolchains , clean , test_ids , build_report , build_properties ))
583
+ t = threading .Thread (target = self .execute_thread_slice , args = (q , target , toolchains , clean , test_ids , self . build_report , self . build_properties ))
579
584
t .daemon = True
580
585
t .start ()
581
586
execute_threads .append (t )
@@ -588,7 +593,7 @@ def execute(self):
588
593
if target not in self .test_suite_properties_ext :
589
594
self .test_suite_properties_ext [target ] = {}
590
595
591
- self .execute_thread_slice (q , target , toolchains , clean , test_ids , build_report , build_properties )
596
+ self .execute_thread_slice (q , target , toolchains , clean , test_ids , self . build_report , self . build_properties )
592
597
q .get ()
593
598
594
599
if self .db_logger :
@@ -597,9 +602,9 @@ def execute(self):
597
602
self .db_logger .update_build_id_info (self .db_logger_build_id , _status_fk = self .db_logger .BUILD_ID_STATUS_COMPLETED )
598
603
self .db_logger .disconnect ();
599
604
600
- return self .test_summary , self .shuffle_random_seed , self .test_summary_ext , self .test_suite_properties_ext , build_report , build_properties
605
+ return self .test_summary , self .shuffle_random_seed , self .test_summary_ext , self .test_suite_properties_ext , self . build_report , self . build_properties
601
606
602
- def get_valid_tests (self , test_map_keys , target , toolchain , test_ids ):
607
+ def get_valid_tests (self , test_map_keys , target , toolchain , test_ids , include_non_automated ):
603
608
valid_test_map_keys = []
604
609
605
610
for test_id in test_map_keys :
@@ -626,7 +631,12 @@ def get_valid_tests(self, test_map_keys, target, toolchain, test_ids):
626
631
print self .logger .log_line (self .logger .LogType .INFO , 'Peripheral test skipped for target %s' % (target ))
627
632
continue
628
633
629
- if test .automated and test .is_supported (target , toolchain ):
634
+ if not include_non_automated and not test .automated :
635
+ if self .opts_verbose_skipped_tests :
636
+ print self .logger .log_line (self .logger .LogType .INFO , 'Non automated test skipped for target %s' % (target ))
637
+ continue
638
+
639
+ if test .is_supported (target , toolchain ):
630
640
if test .peripherals is None and self .opts_only_build_tests :
631
641
# When users are using 'build only flag' and test do not have
632
642
# specified peripherals we can allow test building by default
0 commit comments