-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathterminal.robot
73 lines (65 loc) · 3.18 KB
/
terminal.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
*** Settings ***
Documentation This suite verifies the correct operation of keywords
... entering and parsing UEFI shell commands
Library Collections
Library OperatingSystem
Library Process
Library String
Library Telnet timeout=30 seconds connection_timeout=120 seconds
Library SSHLibrary timeout=90 seconds
Library RequestsLibrary
# TODO: maybe have a single file to include if we need to include the same
# stuff in all test cases
Resource ../variables.robot
Resource ../keywords.robot
Resource ../keys.robot
# TODO:
# - document which setup/teardown keywords to use and what are they doing
# - go threough them and make sure they are doing what the name suggest (not
# exactly the case right now)
Suite Setup Run Keyword
... Prepare Test Suite
Suite Teardown Run Keyword
... Log Out And Close Connection
*** Test Cases ***
Execute UEFI Shell Command
[Documentation] Test Execute Shell Command kwd
Power On
Enter UEFI Shell
FOR ${iteration} IN RANGE 1 50
Log To Console Iteration: ${iteration}
${out}= Execute UEFI Shell Command map
Should Contain ${out} Alias(s):
${out}= Execute UEFI Shell Command devices
Should Contain ${out} Device Name
${out}= Execute UEFI Shell Command bcfg boot dump
Should Contain ${out} Optional- N
${out}= Execute UEFI Shell Command dmpstore # this command prints data for a long time
Should Contain ${out} GlobalVariable
END
Execute Command In Terminal over SSH (Windows)
[Documentation] Test Execute Command In Terminal keyword over SSH. This is related
... to bug: https://github.com/Dasharo/open-source-firmware-validation/issues/355
... when a command was run multiple times, every time it produced different outputs.
... Usually containing parts of previously run command.
Skip If not ${TESTS_IN_WINDOWS_SUPPORT} Execute Command In Terminal over SSH (Windows) not supported
Power On
Login To Windows
Set Test Variable ${COMMAND} Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' }
${out1}= Execute Command In Terminal ${COMMAND}
${out2}= Execute Command In Terminal ${COMMAND}
Should Be Equal As Strings ${out1} ${out2}
Should Not Contain ${out1} ${COMMAND}
Should Not Contain ${out2} ${COMMAND}
Set Test Variable ${COMMAND} ls
${out1}= Execute Command In Terminal ${COMMAND}
${out2}= Execute Command In Terminal ${COMMAND}
Should Be Equal As Strings ${out1} ${out2}
Should Not Contain ${out1} ${COMMAND}
Should Not Contain ${out2} ${COMMAND}
Set Test Variable ${COMMAND} driverquery
${out1}= Execute Command In Terminal ${COMMAND}
${out2}= Execute Command In Terminal ${COMMAND}
Should Be Equal As Strings ${out1} ${out2}
Should Not Contain ${out1} ${COMMAND}
Should Not Contain ${out2} ${COMMAND}