To overcome IPMItool dependency
Resolves openbmc/openbmc-test-automation#40
Change-Id: I136b2c6303d4c977d320dc1976e710031f174499
Signed-off-by: Sivas SRR <sivas.srr@in.ibm.com>
diff --git a/tests/test_bootpolicy.robot b/tests/test_bootpolicy.robot
index 32e2477..bc635a6 100644
--- a/tests/test_bootpolicy.robot
+++ b/tests/test_bootpolicy.robot
@@ -5,10 +5,11 @@
Resource ../lib/rest_client.robot
Resource ../lib/ipmi_client.robot
Resource ../lib/utils.robot
-Resource ../lib/openbmc_ffdc.robot
+Resource ../lib/openbmc_ffdc.robot
Suite Setup Open Connection And Log In
Suite Teardown Close All Connections
+Test Setup Initialize DBUS cmd "boot_policy"
Test Teardown Log FFDC
*** Variables ***
@@ -23,8 +24,9 @@
${boot} = Read Attribute /org/openbmc/settings/host0 boot_policy
Should Be Equal ${boot} ONETIME
- ${output} = Run IPMI Standard command chassis bootparam get 5
- Should Contain ${output} Options apply to only next boot
+ ${output} ${stderr}= Execute Command ${dbuscmd} return_stderr=True
+ Should Be Empty ${stderr}
+ Should Contain ${output} ONETIME
Set Permanent boot policy using REST
[Documentation] This testcase is to set permanent boot policy using REST
@@ -34,8 +36,9 @@
${boot} = Read Attribute /org/openbmc/settings/host0 boot_policy
Should Be Equal ${boot} PERMANENT
- ${output} = Run IPMI Standard command chassis bootparam get 5
- Should Contain ${output} Options apply to all future boots
+ ${output} ${stderr}= Execute Command ${dbuscmd} return_stderr=True
+ Should Be Empty ${stderr}
+ Should Contain ${output} PERMANENT
Set Onetime boot policy using IPMITOOL
[Documentation] This testcase is to set boot policy to onetime boot using ipmitool
@@ -44,8 +47,9 @@
Run IPMI command 0x0 0x8 0x05 0x80 0x00 0x00 0x00 0x00
${boot} = Read Attribute /org/openbmc/settings/host0 boot_policy
Should Be Equal ${boot} ONETIME
- ${output} = Run IPMI Standard command chassis bootparam get 5
- Should Contain ${output} Options apply to only next boot
+ ${output} ${stderr}= Execute Command ${dbuscmd} return_stderr=True
+ Should Be Empty ${stderr}
+ Should Contain ${output} ONETIME
Set Permanent boot policy using IPMITOOL
[Documentation] This testcase is to set boot policy to permanent using ipmitool
@@ -54,8 +58,9 @@
Run IPMI command 0x0 0x8 0x05 0xC0 0x00 0x00 0x00 0x00
${boot} = Read Attribute /org/openbmc/settings/host0 boot_policy
Should Be Equal ${boot} PERMANENT
- ${output} = Run IPMI Standard command chassis bootparam get 5
- Should Contain ${output} Options apply to all future boots
+ ${output} ${stderr}= Execute Command ${dbuscmd} return_stderr=True
+ Should Be Empty ${stderr}
+ Should Contain ${output} PERMANENT
Boot order with permanent boot policy
[Documentation] This testcase is to verify that boot order does not change
@@ -137,3 +142,6 @@
${bootDevice} = Set Variable ${args}
${valueDict} = create dictionary data=${bootDevice}
Write Attribute /org/openbmc/settings/host0 boot_flags data=${valueDict}
+
+
+