Skip to content

Commit 6606e5d

Browse files
committed
self-tests/serial_stability.robot: Add
Signed-off-by: Filip Gołaś <[email protected]>
1 parent 1867003 commit 6606e5d

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

self-tests/serial_stability.robot

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
*** Settings ***
2+
Library Collections
3+
Library OperatingSystem
4+
Library Process
5+
Library String
6+
Library Telnet timeout=20 seconds connection_timeout=120 seconds
7+
Library SSHLibrary timeout=90 seconds
8+
Library RequestsLibrary
9+
# TODO: maybe have a single file to include if we need to include the same
10+
# stuff in all test cases
11+
Resource ../variables.robot
12+
Resource ../keywords.robot
13+
Resource ../keys.robot
14+
15+
# TODO:
16+
# - document which setup/teardown keywords to use and what are they doing
17+
# - go threough them and make sure they are doing what the name suggest (not
18+
# exactly the case right now)
19+
Suite Setup Run Keywords
20+
... Prepare Test Suite
21+
Suite Teardown Run Keyword
22+
... Log Out And Close Connection
23+
24+
Default Tags automated
25+
26+
27+
*** Test Cases ***
28+
Traditional Serial
29+
VAR ${TELNET_FUZZY_MAX_ERRORS}= 0 scope=GLOBAL
30+
VAR ${failed}= ${FALSE}
31+
FOR ${i} IN RANGE 10
32+
${st}= Run Keyword And Return Status Test
33+
IF $st
34+
Log To Console PASS
35+
ELSE
36+
Log To Console FAIL
37+
VAR ${failed}= ${TRUE}
38+
END
39+
END
40+
Should Not Be True $failed
41+
42+
Fuzzy Serial
43+
VAR ${TELNET_FUZZY_MAX_ERRORS}= 1 scope=GLOBAL
44+
VAR ${failed}= ${FALSE}
45+
FOR ${i} IN RANGE 10
46+
${st}= Run Keyword And Return Status Test Fuzzy
47+
IF $st
48+
Log To Console PASS
49+
ELSE
50+
Log To Console FAIL
51+
VAR ${failed}= ${TRUE}
52+
END
53+
END
54+
Should Not Be True $failed
55+
56+
57+
*** Keywords ***
58+
Test
59+
Power On
60+
${menu}= Enter Setup Menu Tianocore And Return Construction
61+
List Should Contain Value ${menu} > User Password Management
62+
List Should Contain Value ${menu} > Device Manager
63+
List Should Contain Value ${menu} > Dasharo System Features
64+
List Should Contain Value ${menu} > One Time Boot
65+
List Should Contain Value ${menu} > Boot Maintenance Manager
66+
${menu}= Enter Dasharo System Features ${menu}
67+
List Should Contain Value ${menu} > Dasharo Security Options
68+
List Should Contain Value ${menu} > Networking Options
69+
List Should Contain Value ${menu} > USB Configuration
70+
List Should Contain Value ${menu} > Intel Management Engine Options
71+
List Should Contain Value ${menu} > Power Management Options
72+
List Should Contain Value ${menu} > Serial Port Configuration
73+
74+
Test Fuzzy
75+
Power On
76+
${menu}= Enter Setup Menu Tianocore And Return Construction
77+
List Should Contain Value Fuzzy ${menu} > User Password Management max_errors=${TELNET_FUZZY_MAX_ERRORS}
78+
List Should Contain Value Fuzzy ${menu} > Device Manager max_errors=${TELNET_FUZZY_MAX_ERRORS}
79+
List Should Contain Value Fuzzy ${menu} > Dasharo System Features max_errors=${TELNET_FUZZY_MAX_ERRORS}
80+
List Should Contain Value Fuzzy ${menu} > One Time Boot max_errors=${TELNET_FUZZY_MAX_ERRORS}
81+
List Should Contain Value Fuzzy ${menu} > Boot Maintenance Manager max_errors=${TELNET_FUZZY_MAX_ERRORS}
82+
${menu}= Enter Dasharo System Features ${menu}
83+
List Should Contain Value Fuzzy ${menu} > Dasharo Security Options max_errors=${TELNET_FUZZY_MAX_ERRORS}
84+
List Should Contain Value Fuzzy ${menu} > Networking Options max_errors=${TELNET_FUZZY_MAX_ERRORS}
85+
List Should Contain Value Fuzzy ${menu} > USB Configuration max_errors=${TELNET_FUZZY_MAX_ERRORS}
86+
List Should Contain Value Fuzzy
87+
... ${menu}
88+
... > Intel Management Engine Options
89+
... max_errors=${TELNET_FUZZY_MAX_ERRORS}
90+
List Should Contain Value Fuzzy ${menu} > Power Management Options max_errors=${TELNET_FUZZY_MAX_ERRORS}
91+
List Should Contain Value Fuzzy ${menu} > Serial Port Configuration max_errors=${TELNET_FUZZY_MAX_ERRORS}

0 commit comments

Comments
 (0)