PLDM tool test case for FRU and minor fixes

Changes:
   - Fix for PDR and GetPLDMCommands.
   - Add two new TC for PLDM FRU

Change-Id: I6ef1f12bce0e29e5f1debd5f8a13a86eff299f9e
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/pldm/test_pldm_fru.robot b/pldm/test_pldm_fru.robot
index 2c747d9..ace9db5 100644
--- a/pldm/test_pldm_fru.robot
+++ b/pldm/test_pldm_fru.robot
@@ -32,3 +32,33 @@
     Valid Range  ${pldm_output['frutablelength']}  1
     Valid Range  ${pldm_output['total_number_of_records_in_table']}  1
     Valid Range  ${pldm_output['total_number_of_record_set_identifiers_in_table']}  1
+
+Verify GetFruRecordTable
+    [Documentation]  Verify GetFruRecordTable response message.
+    [Tags]  Verify_GetFruRecordTable
+
+    ${pldm_output}=  Pldmtool  fru GetFruRecordTable
+    Should Not Be Empty  ${pldm_output}
+    #TODO: Verify the fru table content.
+
+Verify GetFRURecordByOption
+    [Documentation]  Verify GetFRURecordByOption response message for
+    ...              the available FRU record identifier.
+    [Tags]  Verify_GetFRURecordByOption
+
+    # pldm_output:
+    # [fru_record_set_identifier]:                    2
+    # [fru_record_type]:                              1(General)
+    # [number_of_fru_fields]:                         4
+    # [encoding_type_for_fru_fields]:                 1(ASCII)
+    # [     fru_field_type]:                              Name
+    # [     fru_field_length]:                            12
+    # [     fru_field_value]:                             BMC PLANAR
+
+    ${pldm_output}=  Pldmtool  fru GetFruRecordTableMetadata
+    ${fru_rec_id}=  Convert To Integer  ${pldm_output['total_number_of_record_set_identifiers_in_table']}
+    FOR   ${i}  IN RANGE  ${fru_rec_id+1}
+       ${pldm_output}=  Run Keyword  Pldmtool  fru GetFRURecordByOption -i ${i} -r 0 -f 0
+       Run Keyword  Rprint Vars  pldm_output
+       Should Not Be Empty  ${pldm_output}
+    END
diff --git a/pldm/test_pldm_platform.robot b/pldm/test_pldm_platform.robot
index f6c52ad..5700770 100644
--- a/pldm/test_pldm_platform.robot
+++ b/pldm/test_pldm_platform.robot
@@ -26,7 +26,6 @@
        ${record_handle}=  Set Variable  ${next_record_handle}
     END
 
-
 Verify SetStateEffecterStates
     [Documentation]  Verify set state effecter states response message.
     [Tags]  Verify_SetStateEffecterStates
@@ -80,7 +79,7 @@
     #       GetPDR type 'PLDM_STATE_SENSOR_PDR' Dev implementation is still in progress
     #       TODO: Verify output of GetPDR type 'PLDM_STATE_SENSOR_PDR'
     Run Keyword If  ${pldm_output['pdrtype']} == ${PLDM_PDR_TYPES['PLDM_STATE_EFFECTER_PDR']}
-    ...  Valid Dict  pldm_output  valid_values=${RESPONSE_DICT_GETPDR_SETSTATEEFFECTER}
+    ...  Log To Console  "Found PDR Type - PLDM_STATE_EFFECTER_PDR"
     ...  ELSE IF  ${pldm_output['pdrtype']} == ${PLDM_PDR_TYPES['PLDM_PDR_FRU_RECORD_SET']}
     ...  Valid Dict  pldm_output  valid_values=${RESPONSE_DICT_GETPDR_FRURECORDSETIDENTIFIER}
     ...  ELSE IF  ${pldm_output['pdrtype']} == ${PLDM_PDR_TYPES['PLDM_PDR_ENTITY_ASSOCIATION']}