New test case: Acceptance White Button IPL
- Stress all hardware available in the system.
- Run the bootme script with an hour period.
- Validate if HTX errors exist before every reboot.
Keywords added in syslib/utils_os.robot
- "Run Soft Bootme" keyword created. Configure the server to
reboot and configure HTX again once it's booted.
- "Shutdown Bootme" keyword created. Once the test case is over,
this keyword must be called to stop and erase bootme entries
in the cron file.
Modified Run MDT Profile keyword in utils_os.robot
- It now accepts the profile argument to eliminate the Suite
Variable need.
Keyword added in lib/bmc_network_utils.robot
- "Run Build Net" keyword created to preconfigure the network
within the server, creating loops between ethernet ports and
skipping the communication link.
Change-Id: I304213ed307927c380372f9daaa8a9a41621d807
Signed-off-by: Daniel Gonzalez <Luis.Daniel.Gonzalez@ibm.com>
diff --git a/lib/bmc_network_utils.robot b/lib/bmc_network_utils.robot
index 8c0e2ef..07521dd 100644
--- a/lib/bmc_network_utils.robot
+++ b/lib/bmc_network_utils.robot
@@ -238,3 +238,11 @@
Should Be True ${status}
... msg=MAC address ${system_mac} does not match ${mac_addr}.
+
+Run Build Net
+ [Documentation] Run build_net to preconfigure the ethernet interfaces.
+
+ OS Execute Command build_net help y y
+ # Run pingum to chech if the "build_net" was run correctly done.
+ ${output} ${stderr} ${rc}= OS Execute Command pingum
+ Should Contain ${output} All networks ping Ok
\ No newline at end of file
diff --git a/syslib/utils_os.robot b/syslib/utils_os.robot
index 476dc96..bbf8b8a 100755
--- a/syslib/utils_os.robot
+++ b/syslib/utils_os.robot
@@ -438,6 +438,9 @@
Run MDT Profile
[Documentation] Load user pre-defined MDT profile.
+ [Arguments] ${HTX_MDT_PROFILE}=${HTX_MDT_PROFILE}
+ # Description of argument(s):
+ # HTX_MDT_PROFILE MDT profile to be executed (e.g. "mdt.bu").
Rprint Timen Start HTX mdt profile execution.
${htx_run} ${stderr} ${rc}= OS Execute Command
@@ -606,3 +609,21 @@
${stdout} ${stderr} ${rc}= OS Execute Command ls /sys/class/net
@{interface_names}= Split String ${stdout}
[Return] @{interface_names}
+
+
+Run Soft Bootme
+ [Documentation] Run a soft bootme for a period of an hour.
+ [Arguments] ${bootme_period}=3
+ # Description of argument(s):
+ # bootme_time Bootme period to be rebooting the system.
+
+ ${output} ${stderr} ${rc}= OS Execute Command
+ ... htxcmdline -bootme on mode:soft period:${bootme_period}
+ Should Contain ${output} bootme on is completed successfully
+
+
+Shutdown Bootme
+ [Documentation] Stop the bootme process.
+
+ ${output} ${stderr} ${rc}= OS Execute Command htxcmdline -bootme off
+ Should Contain ${output} bootme off is completed successfully
\ No newline at end of file
diff --git a/systest/test_boot_acceptance.robot b/systest/test_boot_acceptance.robot
new file mode 100644
index 0000000..8210bd8
--- /dev/null
+++ b/systest/test_boot_acceptance.robot
@@ -0,0 +1,89 @@
+*** Settings ***
+Documentation Make a general hardware stress in a partition with all the
+... resources available.
+
+# Test Parameters:
+# TYPE EEH error function to use, default is 4.
+# OPENBMC_HOST The BMC host name or IP address.
+# OS_HOST The OS host name or IP Address.
+# OS_USERNAME The OS login userid (usually root).
+# OS_PASSWORD The password for the OS login.
+# HTX_DURATION Duration of HTX run (e.g. "24 hours", "8 hours").
+# HTX_INTERVAL The time delay between consecutive checks of HTX
+# status, for example, 30 minutes.
+# In summary: Run HTX for $HTX_DURATION, checking
+# every $HTX_INTERVAL.
+# HTX_MDT_PROFILE MDT profile to be executed (e.g. "mdt.bu, net.mdt, etc")
+# default is "mdt.bu".
+# bootme_period Bootme period where the system will be rebooting. (e.g.
+# "3") 3 = 1 hour period.
+
+# Expected result:
+# HTX runs mdt.bu and doesn't log errors during the acceptance execution.
+
+# Glossary:
+# MDT:
+# Master device table is a collection of hardware devices on the system for
+# which HTX exercisers can be run.
+# build_net:
+# Script that configures every network port when connected to a loop. This
+# skips the communication port to always keep it available.
+# mdt.bu:
+# Default mdt file. Collection of all HTX exercisers. Aim is to test entire
+# system concurrently.
+# HTX error log file /tmp/htxerr
+# Records all the errors that occur. If there's no error during the test, it
+# should be empty.
+# bootme:
+# This configures the cron to reboot the system and re-run the HTX profile.
+
+Library SSHLibrary
+Library String
+Library ../lib/bmc_ssh_utils.py
+Resource ../lib/resource.txt
+Resource ../syslib/utils_os.robot
+Resource ../lib/bmc_network_utils.robot
+
+Suite Setup Suite Setup Execution
+Suite Teardown Collect HTX Log Files
+Test Teardown FFDC On Test Case Fail
+
+*** Variables ***
+
+${HTX_DURATION} 8 hours
+${HTX_INTERVAL} 35 minutes
+${HTX_MDT_PROFILE} mdt.bu
+${bootme_period} 3
+
+*** Test Cases ***
+
+Test Acceptance IPL
+ [Documentation] Stress every controller connected via PCI in an OS with
+ ... every resource available (CPU, RAM, storage, ethernet controllers,
+ ... etc).
+ [Tags] Test_Acceptance_IPL
+
+ Run Build Net
+ Run MDT Profile ${HTX_MDT_PROFILE}
+ Run Soft Bootme
+ Repeat Keyword ${HTX_DURATION} Run Keywords
+ ... Wait Until Keyword Succeeds 15 min 30 sec Is OS Booted
+ ... AND
+ ... OS Execute Command uptime
+ ... AND
+ ... Run Key U sleep \ ${HTX_INTERVAL}
+ ... AND
+ ... Check HTX Run Status
+ ... AND
+ ... Wait Until Keyword Succeeds 20 min 10 sec Is Host Off
+ Wait Until Keyword Succeeds 15 min 15 sec Is OS Booted
+ Shutdown Bootme
+ Shutdown HTX Exerciser
+
+*** Keywords ***
+Suite Setup Execution
+ [Documentation] Do setup tasks.
+
+ REST Power On stack_mode=normal
+ Tool Exist htxcmdline
+ Create Default MDT Profile