blob: 48a59fcf60a202ff6ceeb7781c0fa8ffb9f71bc1 [file] [log] [blame]
George Keishing6c2ac912017-05-12 06:36:21 -05001*** Settings ***
2Documentation Module to test OS reboot functionality.
3
4Resource ../lib/boot_utils.robot
George Keishing329aac32017-06-05 12:03:26 -05005Resource ../extended/obmc_boot_test_resource.robot
George Keishing6c2ac912017-05-12 06:36:21 -05006
George Keishing329aac32017-06-05 12:03:26 -05007Suite Setup Run Key Start SOL Console Logging
Steven Sombarfac31e92017-12-15 09:40:34 -06008Test Teardown Test Teardown Execution
George Keishing6c2ac912017-05-12 06:36:21 -05009
10*** Variables ***
11
12# User defined boot test iteration.
George Keishing329aac32017-06-05 12:03:26 -050013${BOOT_LOOP_COUNT} ${1}
George Keishing6c2ac912017-05-12 06:36:21 -050014
15*** Test Cases ***
16
17Host Reboot Loop
18 [Documentation] Boot OS and trigger reboot and expect
19 ... OS to boot back.
George Keishingd3166252018-10-24 12:10:27 -050020 [Tags] Host_Reboot_Loop
21
George Keishing6c2ac912017-05-12 06:36:21 -050022 # 1. Boot OS
23 # 2. Verify OS is booted
24 # 3. Issue "reboot" from OS
25 # 4. Verify if OS is booted back
26
George Keishing329aac32017-06-05 12:03:26 -050027 # By default run test for 1 loop, else user input iteration.
George Keishing6c2ac912017-05-12 06:36:21 -050028 # Fails immediately if any of the execution rounds fail.
29
30 # Note: Host Reboot is implemented by the OBMC Boot Test tool.
31 # OBMC Boot Test will take the necessary steps to get the OBMC
32 # to a host powered on state before attempting the Host Reboot.
33 Repeat Keyword ${BOOT_LOOP_COUNT} times Host Reboot
34
35*** Keywords ***
George Keishing329aac32017-06-05 12:03:26 -050036
Steven Sombarfac31e92017-12-15 09:40:34 -060037Test Teardown Execution
George Keishing329aac32017-06-05 12:03:26 -050038 [Documentation] Do the post test teardown.
39 # 1. Capture FFDC on test failure.
40 # 2. Stop SOL logging.
41 # 3. Close all open SSH connections.
42
43 FFDC On Test Case Fail
44
45 ${keyword_buf}= Catenate Stop SOL Console Logging
46 ... \ targ_file_path=${EXECDIR}${/}logs${/}SOL.log
47 Run Key ${keyword_buf}
48
49 Close All Connections