-
Notifications
You must be signed in to change notification settings - Fork 37
Allow a host test to reset the device under test #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow a host test to reset the device under test #174
Conversation
@@ -64,6 +64,14 @@ def reset_dut(self, value): | |||
if self.__event_queue: | |||
self.__event_queue.put(('__reset_dut', value, time())) | |||
|
|||
def reset(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I wrote this code pretty hastily, but let's get the keys matching the function names if at all possible.
Can we make this function soft_reset_dut
?
This would mean you'd need to update your custom host test as well.
@@ -64,6 +64,14 @@ def reset_dut(self, value): | |||
if self.__event_queue: | |||
self.__event_queue.put(('__reset_dut', value, time())) | |||
|
|||
def reset(self): | |||
""" | |||
Reset device under test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this comment different from the function above. Something like
Reset device under test (without restarting the host test)
connector.finish() | ||
return 0 | ||
if not connector.write_kv(key, value): | ||
elif key == '__reset_dut': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this key match the event queue key: __reset_dut
-> __soft_reset_dut
.
@@ -366,6 +366,9 @@ def process_code_coverage(key, value, timestamp): | |||
self.logger.prn_inf("%s(%s)" % (key, str(value))) | |||
result = value | |||
event_queue.put(('__exit_event_queue', 0, time())) | |||
elif key == '__soft_reset_dut': | |||
# This event only resets the dut, not the host test | |||
dut_event_queue.put(('__reset_dut', True, time())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this key match the event queue key: __reset_dut
-> __soft_reset_dut
.
b4dbbea
to
b66e122
Compare
1 similar comment
Add a host test reset function to allow the current DUT to be reset. This allow unexpected power loss to be tested.
b66e122
to
8b00025
Compare
PR in little FS for this change: |
@c1728p9 Will we need to release a new version of htrun after this patch goes in? |
Hi @theotherjimmy I forgot to post an update here but offline we decided to just go with the |
Thanks @bridadan. Sorry for the noise guys. |
Add a host test reset function to allow the current DUT to be reset. This allow unexpected power loss to be tested.
CC @bridadan @studavekar @theotherjimmy