-
Notifications
You must be signed in to change notification settings - Fork 2
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
add blind wait for flasher image when we can't detect state #82
base: master
Are you sure you want to change the base?
Conversation
Change-type: patch Signed-off-by: Ryan Cooke <[email protected]>
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.
Suggestions to console log message only. Logic seems fine.
} | ||
console.log('Internally flashed - powering off DUT'); | ||
} else { | ||
console.log(`Blindly waiting for DUT to interally flash - waiting for a period of ${BLIND_WAIT}... and hoping`) |
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.
console.log(`Blindly waiting for DUT to interally flash - waiting for a period of ${BLIND_WAIT}... and hoping`) | |
console.log(`There is no way to know if DUT has been flashed. Hence, waiting for DUT to complete flashing process internally for a period of ${BLIND_WAIT / 1000} seconds`) |
More positive console log message with a little more information and hope. Also, spelling fix
if(BLIND_WAIT === false){ | ||
while (dutOn) { | ||
await delay(1000 * 10); // 10 seconds between checks | ||
console.log(`waiting for DUT to be off`); |
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.
console.log(`waiting for DUT to be off`); | |
console.log(`Checking if DUT has turned off by now`); |
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.
NIT, optional
// occasionally the DUT might appear to be powered down, but it isn't - we want to confirm that the DUT has stayed off for an interval of time | ||
if (!dutOn) { | ||
let offCount = 0; | ||
console.log(`detected DUT has powered off - confirming...`); |
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.
console.log(`detected DUT has powered off - confirming...`); | |
console.log(`DUT power off detected: confirming ...`); |
There exist some cases where we:
This PR adds a workaround, using the
FLASHER_IMAGE_WAIT
env var, you can specify in ms a period to wait for the flasher image to flash the DUT internal storage, and then hope it's done.Change-type: patch