Files
Maciej Pijanowski 2bd2e50c9b robocop: enable ReplaceWithVAR formatter
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2025-07-29 10:41:24 +02:00

58 lines
2.5 KiB
Plaintext

*** 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 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
VAR ${COMMAND}= Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -match '^USB' } scope=TEST
${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}
VAR ${COMMAND}= ls scope=TEST
${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}
VAR ${COMMAND}= driverquery scope=TEST
${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}