@@ -142,7 +142,8 @@ def __init__(self,
142
142
_opts_only_build_tests = False ,
143
143
_opts_suppress_summary = False ,
144
144
_opts_test_x_toolchain_summary = False ,
145
- _opts_copy_method = None
145
+ _opts_copy_method = None ,
146
+ _opts_mut_reset_type = None
146
147
):
147
148
""" Let's try hard to init this object """
148
149
PATTERN = "\\ {(" + "|" .join (self .TEST_RESULT_MAPPING .keys ()) + ")\\ }"
@@ -181,6 +182,7 @@ def __init__(self,
181
182
self .opts_suppress_summary = _opts_suppress_summary
182
183
self .opts_test_x_toolchain_summary = _opts_test_x_toolchain_summary
183
184
self .opts_copy_method = _opts_copy_method
185
+ self .opts_mut_reset_type = _opts_mut_reset_type
184
186
185
187
def shuffle_random_func (self ):
186
188
return self .shuffle_random_seed
@@ -584,12 +586,19 @@ def shape_global_test_loop_result(self, test_all_result):
584
586
result = test_all_result [0 ]
585
587
return result
586
588
587
- def run_host_test (self , name , disk , port , duration , verbose = False , extra_serial = "" ):
589
+ def run_host_test (self , name , disk , port , duration , reset = None , verbose = False , extra_serial = None ):
588
590
""" Function creates new process with host test configured with particular test case.
589
591
Function also is pooling for serial port activity from process to catch all data
590
592
printed by test runner and host test during test execution."""
591
593
# print "{%s} port:%s disk:%s" % (name, port, disk),
592
- cmd = ["python" , "%s.py" % name , '-p' , port , '-d' , disk , '-t' , str (duration ), "-e" , extra_serial ]
594
+ cmd = ["python" , "%s.py" % name , '-p' , port , '-d' , disk , '-t' , str (duration )]
595
+
596
+ # Add extra parameters to host_test
597
+ if extra_serial is not None :
598
+ cmd += ["-e" , extra_serial ]
599
+ if reset is not None :
600
+ cmd += ["-r" , reset ]
601
+
593
602
proc = Popen (cmd , stdout = PIPE , cwd = HOST_TESTS )
594
603
obs = ProcessObserver (proc )
595
604
start_time = time ()
@@ -1054,6 +1063,11 @@ def get_default_test_options_parser():
1054
1063
default = None ,
1055
1064
help = 'Shuffle seed (If you want to reproduce your shuffle order please use seed provided in test summary)' )
1056
1065
1066
+ parser .add_option ('' , '--reset-type' ,
1067
+ dest = 'mut_reset_type' ,
1068
+ default = None ,
1069
+ help = 'Extra reset method used to reset MUT by host test script' )
1070
+
1057
1071
parser .add_option ('-f' , '--filter' ,
1058
1072
dest = 'general_filter_regex' ,
1059
1073
default = None ,
@@ -1076,4 +1090,10 @@ def get_default_test_options_parser():
1076
1090
default = False ,
1077
1091
action = "store_true" ,
1078
1092
help = 'Verbose mode (prints some extra information)' )
1093
+
1094
+ parser .add_option ('' , '--version' ,
1095
+ dest = 'version' ,
1096
+ default = False ,
1097
+ action = "store_true" ,
1098
+ help = 'Prints script version and exits' )
1079
1099
return parser
0 commit comments