FRU: simplify BMC FRU table construction

We should be able to map standard D-Bus FRU inventory properties to
standard FRU properties from the PLDM FRU spec.
This commit will simplify things by removing JSONs for standard FRUs.

The standard FRU jsons are not going to be installed, we have mandated
the default DBUS lookup and setup Default Fru record map.
If OEM FRU JSONs are present then only those will be parsed by the
parser.

Tested on rainier with the pldmtool.

Change-Id: I53cd3cd98a0552e3faa42d50c9ae93280218ad28
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/test/libpldmresponder_fru_test.cpp b/test/libpldmresponder_fru_test.cpp
index 9e66ea2..7b1b470 100644
--- a/test/libpldmresponder_fru_test.cpp
+++ b/test/libpldmresponder_fru_test.cpp
@@ -1,47 +1,63 @@
 #include "libpldmresponder/fru_parser.hpp"
 
 #include <gtest/gtest.h>
-
 TEST(FruParser, allScenarios)
 {
     using namespace pldm::responder::fru_parser;
 
-    // No master FRU JSON
-    ASSERT_THROW(FruParser("./fru_jsons/malformed1"), std::exception);
-    // Malformed master FRU JSON
-    ASSERT_THROW(FruParser("./fru_jsons/malformed2"), std::exception);
-    // Malformed FRU JSON
-    ASSERT_THROW(FruParser("./fru_jsons/malformed3"), std::exception);
-
     FruParser parser{"./fru_jsons/good"};
 
     // Get an item with a single PLDM FRU record
-    FruRecordInfos cpu{{1,
-                        1,
-                        {{"xyz.openbmc_project.Inventory.Decorator.Asset",
-                          "PartNumber", "string", 3},
-                         {"xyz.openbmc_project.Inventory.Decorator.Asset",
-                          "SerialNumber", "string", 4}}}};
+    FruRecordInfos cpu{
+        {1,
+         1,
+         {{"xyz.openbmc_project.Inventory.Decorator.Asset", "Model", "string",
+           2},
+          {"xyz.openbmc_project.Inventory.Decorator.Asset", "PartNumber",
+           "string", 3},
+          {"xyz.openbmc_project.Inventory.Decorator.Asset", "SerialNumber",
+           "string", 4},
+          {"xyz.openbmc_project.Inventory.Decorator.Asset", "Manufacturer",
+           "string", 5},
+          {"xyz.openbmc_project.Inventory.Item", "PrettyName", "string", 8},
+          {"xyz.openbmc_project.Inventory.Decorator.AssetTag", "AssetTag",
+           "string", 11},
+          {"xyz.openbmc_project.Inventory.Decorator.Revision", "Version",
+           "string", 10}}},
+        {1,
+         1,
+         {{"xyz.openbmc_project.Inventory.Decorator.Asset", "PartNumber",
+           "string", 3},
+          {"xyz.openbmc_project.Inventory.Decorator.Asset", "SerialNumber",
+           "string", 4}}}};
     auto cpuInfos =
         parser.getRecordInfo("xyz.openbmc_project.Inventory.Item.Cpu");
-    ASSERT_EQ(cpuInfos.size(), 1);
+    ASSERT_EQ(cpuInfos.size(), 2);
     ASSERT_EQ(cpu == cpuInfos, true);
 
-    // Get an item type with 2 PLDM FRU records
+    // Get an item type with 3 PLDM FRU records
     auto boardInfos =
         parser.getRecordInfo("xyz.openbmc_project.Inventory.Item.Board");
-    ASSERT_EQ(boardInfos.size(), 2);
+    ASSERT_EQ(boardInfos.size(), 3);
 
     // D-Bus lookup info for FRU information
-    DBusLookupInfo lookupInfo{"xyz.openbmc_project.Inventory.Manager",
-                              "/xyz/openbmc_project/inventory/system/",
-                              {"xyz.openbmc_project.Inventory.Item.Board",
-                               "xyz.openbmc_project.Inventory.Item.Cpu"}};
-
+    DBusLookupInfo lookupInfo{
+        "xyz.openbmc_project.Inventory.Manager",
+        "/xyz/openbmc_project/inventory",
+        {"xyz.openbmc_project.Inventory.Item.Chassis",
+         "xyz.openbmc_project.Inventory.Item.Board",
+         "xyz.openbmc_project.Inventory.Item.Board.Motherboard",
+         "xyz.openbmc_project.Inventory.Item.Panel",
+         "xyz.openbmc_project.Inventory.Item.PowerSupply",
+         "xyz.openbmc_project.Inventory.Item.Vrm",
+         "xyz.openbmc_project.Inventory.Item.Cpu",
+         "xyz.openbmc_project.Inventory.Item.Bmc",
+         "xyz.openbmc_project.Inventory.Item.Dimm",
+         "xyz.openbmc_project.Inventory.Item.Tpm",
+         "xyz.openbmc_project.Inventory.Item.System"}};
     auto dbusInfo = parser.inventoryLookup();
     ASSERT_EQ(dbusInfo == lookupInfo, true);
 
-    // Search for an invalid item type
     ASSERT_THROW(
         parser.getRecordInfo("xyz.openbmc_project.Inventory.Item.DIMM"),
         std::exception);