blob: 70929f480eb70b7455760e136ce908c1223db018 [file] [log] [blame]
Rahul Maheshwari4d488572019-12-10 23:53:05 -06001*** Settings ***
2
3Documentation Module to test PLDM base commands.
4Library ../lib/pldm_utils.py
5Variables ../data/pldm_variables.py
6Resource ../lib/openbmc_ffdc.robot
7
8Test Setup Printn
9Test Teardown FFDC On Test Case Fail
10
11
12*** Test Cases ***
Sridevi Ramesh039bc762020-03-30 09:59:07 -050013
Rahul Maheshwari4d488572019-12-10 23:53:05 -060014Verify Get PLDM Types
15 [Documentation] Verify supported PLDM types.
16 [Tags] Verify_Get_PLDM_Types
17
18 ${pldm_output}= Pldmtool base GetPLDMTypes
19 Valid List pldm_output['supported_types']['text'] required_values=${PLDM_SUPPORTED_TYPES}
20
21
22Verify Get PLDM Version For Base
23 [Documentation] Verify supported PLDM version for base type.
24 [Tags] Verify_Get_PLDM_Version_For_Base
25
26 ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'base'
27 ${pldm_output}= Pldmtool ${pldm_cmd}
Michael Walsh06de1f72020-02-17 14:28:24 -060028 Valid Value pldm_output['type_0(base)'] ['${VERSION_BASE['STRING']}']
Rahul Maheshwari4d488572019-12-10 23:53:05 -060029
30
31Verify Get PLDM Version For Platform
32 [Documentation] Verify supported PLDM version for platform type.
33 [Tags] Verify_Get_PLDM_Version_For_Platform
34
35 ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'platform'
36 ${pldm_output}= Pldmtool ${pldm_cmd}
Michael Walsh06de1f72020-02-17 14:28:24 -060037 Valid Value pldm_output['type_2(platform)'] ['${VERSION_PLATFORM['STRING']}']
Rahul Maheshwari4d488572019-12-10 23:53:05 -060038
39
40Verify Get PLDM Version For BIOS
41 [Documentation] Verify supported PLDM version for BIOS type.
42 [Tags] Verify_Get_PLDM_Version_For_BIOS
43
44 ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'bios'
45 ${pldm_output}= Pldmtool ${pldm_cmd}
Michael Walsh06de1f72020-02-17 14:28:24 -060046 Valid Value pldm_output['type_3(bios)'] ['${VERSION_BIOS['STRING']}']
Rahul Maheshwari4d488572019-12-10 23:53:05 -060047
48
49Verify Get PLDM Version For FRU
50 [Documentation] Verify supported PLDM version for FRU type.
51 [Tags] Verify_Get_PLDM_Version_For_FRU
52
53 ${pldm_cmd}= Evaluate $CMD_GETPLDMVERSION % 'fru'
54 ${pldm_output}= Pldmtool ${pldm_cmd}
Michael Walsh06de1f72020-02-17 14:28:24 -060055 Valid Value pldm_output['type_4(fru)'] ['${VERSION_FRU['STRING']}']
Sridevi Rameshfe52e402020-02-05 00:15:24 -060056
57Verify GetTID
58 [Documentation] Verify GetTID (Terminus ID) response message.
59 [Tags] Verify_GetTID
60
61 # Example output:
62 # TID : 1
63
64 ${pldm_output}= Pldmtool base GetTID
65 Rprint Vars pldm_output
66
67 Valid Dict pldm_output valid_values={'tid': ['1']}
Sridevi Ramesh039bc762020-03-30 09:59:07 -050068
69Verify GetPLDMCommands
70 [Documentation] Verify GetPLDMCommands response message.
71 [Tags] Verify_GetPLDMCommands
72 [Template] Verify GetPLDMCommands For PLDM Type
73
74 # pldm_type # expected_pldm_cmds
75
76 '0' ${PLDM_BASE_CMDS}
77 '2' ${PLDM_PLATFORM_CMDS}
78 '3' ${PLDM_BIOS_CMDS}
79 '4' ${PLDM_FRU_CMDS}
80
81*** keywords ***
82
83Verify GetPLDMCommands For PLDM Type
84 [Documentation] Verify GetPLDMCommands for given input pldm type with expected pldm cmds.
85 [Arguments] ${pldm_type} ${expected_pldm_cmds}
86
87 # Description of argument(s):
88 # pldm_type pldm type (e.g. '0', '2', '3', '4').
89 # '0' -> base, '2' -> platform, '3' -> 'bios', '4' -> 'fru'.
90 # expected_pldm_cmds expected pldm commands for given pldm type.
91
92 # Example output:
93 # Supported Commands : 2(GetTID) 3(GetPLDMVersion) 4(GetPLDMTypes) 5(GetPLDMCommands)
94
95 ${pldm_output}= Pldmtool base GetPLDMCommands -t ${pldm_type}
96 Rprint Vars pldm_output
97 Valid List pldm_output ${expected_pldm_cmds}