Revamped code for VPD parser
The commit removes all the pre-existing code from the branch
and pushes the revamped code.
Major modification includes:
- Movement from multi exe to single daemon model.
- Multithreaded approach to parse FRU VPD.
- Better error handling.
- Refactored code for performance optimization.
Note: This code supports all the existing functionalities as it is.
Change-Id: I1ddce1f0725ac59020b72709689a1013643bda8b
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
diff --git a/test/utest_utils.cpp b/test/utest_utils.cpp
new file mode 100644
index 0000000..6511dcb
--- /dev/null
+++ b/test/utest_utils.cpp
@@ -0,0 +1,23 @@
+#include <utility/vpd_specific_utility.hpp>
+
+#include <cassert>
+#include <string>
+
+#include <gtest/gtest.h>
+
+using namespace vpd;
+
+TEST(UtilsTest, TestValidValue)
+{
+ std::string key = "VINI";
+ std::string encoding = "MAC";
+ std::string expected = "56:49:4e:49";
+ EXPECT_EQ(expected, vpdSpecificUtility::encodeKeyword(key, encoding));
+}
+
+int main(int argc, char** argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+
+ return RUN_ALL_TESTS();
+}