Skip to content

Commit

Permalink
dasharo-stability/building-boot-os.robot: Example tests
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Gołaś <[email protected]>
  • Loading branch information
philipandag committed Oct 22, 2024
1 parent 540916c commit cdd69f0
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
56 changes: 56 additions & 0 deletions dasharo-stability/building-boot-os.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
*** Settings ***
Library Collections
Library Dialogs
Library OperatingSystem
Library Process
Library String
Library Telnet timeout=20 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 Keywords
... Skip If not ${TESTS_IN_UBUNTU_SUPPORT}
... Build And Flash
Suite Teardown Run Keywords
... Log Out And Close Connection

*** Test Cases ***
BBO001.001 Build and Boot (Ubuntu)
[Documentation] Check if the binary will be built and work properly
... on Ubuntu
Power On
Boot System Or From Connected Disk ubuntu
Flash Firmware /tmp/coreboot.rom
Execute Reboot Command

Login To Linux

BBO001.002 Build and Boot (Windows)
[Documentation] Check if the binary will be built and work properly
... on Windows
Skip If not ${TESTS_IN_WINDOWS_SUPPORT}

Power On
Boot System Or From Connected Disk ubuntu
Flash Firmware /tmp/coreboot.rom
Execute Reboot Command

Login To Windows


*** Keywords ***
Build And Flash
Run git clone https://github.com/Dasharo/dasharo-tools.git
Run cd coreboot; ./build.sh ${COREBOOT_BUILD_WRAPPER_SUBCOMMAND}; cd ..;



3 changes: 2 additions & 1 deletion lib/flash.robot
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ Flash Via Internal Programmer
IF ${read_only}
Fail Make sure that SPI locks are disabled prior flashing internally
END
Send File To DUT ${fw_file_path} /tmp/${fw_file_path}

# If no region is given, flash the whole binary
IF "${region}" != "${EMPTY}"
${args}= Set Variable -N --ifd -i ${region}
ELSE
${args}= Set Variable ${EMPTY}
END
Flash Via Internal Programmer With Args ${fw_file_path} ${args}
Flash Via Internal Programmer With Args /tmp/${fw_file_path} ${args}

Check If RW SECTION B Is Present In A Firmware File
[Documentation] Parses ROM with cbfstool to check if A or A + B sections are there
Expand Down
2 changes: 2 additions & 0 deletions platform-configs/include/default.robot
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,5 @@ ${STABILITY_DETECTION_COLDBOOT_ITERATIONS}= 2
${STABILITY_DETECTION_WARMBOOT_ITERATIONS}= 2
${STABILITY_DETECTION_REBOOT_ITERATIONS}= 5
${STABILITY_DETECTION_SUSPEND_ITERATIONS}= 5
# Command used in the ./build script of coreboot repo
${COREBOOT_BUILD_WRAPPER_SUBCOMMAND}= ${TBD}

0 comments on commit cdd69f0

Please sign in to comment.