-
-
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
menus.robot: added check if DUT reset succeded #448
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ Enter Boot Menu Tianocore | |
|
||
Get Boot Menu Construction | ||
[Documentation] Keyword allows to get and return boot menu construction. | ||
Sleep 1s | ||
${menu}= Read From Terminal Until exit | ||
# Lines to strip: | ||
# TOP: | ||
|
@@ -535,13 +536,36 @@ Remove Disk Password | |
END | ||
Press Key N Times 1 ${SETUP_MENU_KEY} | ||
|
||
Send Reboot Command | ||
Telnet.Write Bare \x1bR\x1br\x1bR | ||
|
||
Tianocore Reset System | ||
# EDK2 interprets Alt + Ctrl + Del on USB keyboards as reset combination. | ||
# On serial console it is ESC R ESC r ESC R. | ||
IF '${DUT_CONNECTION_METHOD}' == 'SSH' | ||
FAIL SSH not supported for interfacing with TianoCore | ||
ELSE IF '${DUT_CONNECTION_METHOD}' == 'Telnet' | ||
Telnet.Write Bare \x1bR\x1br\x1bR | ||
FOR ${i} IN RANGE 0 5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not like that we change it for Telnet only. It means now we will have two different methods of saving changes. One - more manual - for Telnet, the other one - for PiKVM. This sounds like asking for even more problems. |
||
${out}= Read From Terminal | ||
|
||
# Clean up the string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to implement it once again? In the history of this function, we can see the "manual" method has been replaced with the CTRL+ALT+DELETE here: ee72aad If we can prove that:
We can simply bring back the old method by reverting this commit. On top of this, we can add some improvements, if necessary, but I would start with simply bringing the old way. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A long time has passed... I'm verifying if the issue still exists. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. log2.zip |
||
${out}= Replace String ${out} \n ${EMPTY} | ||
${out}= Replace String ${out} \t ${EMPTY} | ||
${out}= Strip String ${out} | ||
|
||
Set Test Variable ${CHECK} ${FALSE} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would appreciate some comments to help us understand the thought process more, and have easier time following the concepts in the code There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have tested 3 options for this keyword. The one I wrote and submitted in this PR. I know the solution isnt perfect as it is - but it is only a proof of concept - and this seemed to work much better. It still had its hickups and hung from time to time. I wrote some tests which rebooted the DUT 50 times using this method and sometimes the test has passed. Sometimes it hung on 40+th try... But more testing should be done and this method should be refined. 3rd method was the 'old' implementation of the kwd (which stored how many times you should press enter and up arrow to get to the default cursor position in dasharo) <- i have run this kwd only once (50 times) and it looked pretty stable - i had to stop the test after some 40th try but as it actually works similarly to the method I tried to write IMO reverting the change to this kwd would greatly improve tests stability. |
||
IF 'Continue' in '${out}' | ||
IF 'Reset' in '${out}' | ||
Set Test Variable ${CHECK} ${TRUE} | ||
END | ||
END | ||
|
||
IF ${CHECK} == ${TRUE} | ||
Go To Reset Option | ||
BREAK | ||
ELSE | ||
Sleep 1s | ||
Telnet.Write Bare ${ESC} | ||
END | ||
END | ||
ELSE IF '${DUT_CONNECTION_METHOD}' == 'open-bmc' | ||
FAIL OpenBMC not yet supported for interfacing with TianoCore | ||
ELSE IF '${DUT_CONNECTION_METHOD}' == 'pikvm' | ||
|
@@ -551,6 +575,26 @@ Tianocore Reset System | |
FAIL Unknown connection method for config: ${CONFIG} | ||
END | ||
|
||
Go To Reset Option | ||
Set Test Variable ${MAX_TRIES} 20 | ||
FOR ${index} IN RANGE 0 ${MAX_TRIES} | ||
${out}= Read From Terminal | ||
|
||
# Clean up the string | ||
${out}= Replace String ${out} \n ${EMPTY} | ||
${out}= Replace String ${out} \t ${EMPTY} | ||
${out}= Strip String ${out} | ||
|
||
Sleep 1s | ||
IF 'the language for the' in '${out}' | ||
Telnet.Write Bare ${ENTER} | ||
BREAK | ||
ELSE | ||
IF ${index} == ${MAX_TRIES} Fail | ||
Telnet.Write Bare ${ARROW_UP} | ||
END | ||
END | ||
|
||
Save Changes | ||
[Documentation] Saves current UEFI settings | ||
Press Key N Times 1 ${F10} | ||
|
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.
Why do we define new keyword and not use it?