IPZ VPD Parser support

This commit enables the app ibm-read-vpd to read the
IPZ format vpd. To build this app, the application
build must be configured with the "--enable-ibm-parser"
option.

The application populates the Inventory with the parsed
VPD data. The parser relies on a JSON config file
that maps the input VPD file path to the Inventory D-Bus
object that hosts the VPD data as properties.

The JSON file also supplies any additional interfaces
and properties that the D-Bus object should implement.

Argument required to run this application-
ibm-read-vpd --file vpd_file

Tested:

Also tested this on Rainier simulation model and verified that VPD
for FRUs is properly published as properties of D-Bus objects in the
Inventory.

Change-Id: Ic9305f25625adced7f64123589dd083e2679afbb
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 4f35b94..05785da 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -3,8 +3,32 @@
 TESTS = $(check_PROGRAMS)
 
 check_PROGRAMS = store_test
+
 store_test_SOURCES = store/store.cpp
 
+check_PROGRAMS += ipz_parser_test
+
+ipz_parser_test_SOURCES = ipz_parser/parser.cpp \
+                          ../impl.cpp
+test_cppflags = \
+	-Igtest \
+	$(GTEST_CPPFLAGS) \
+	$(AM_CPPFLAGS)  \
+	-pthread  \
+	$(PTHREAD_CFLAGS) \
+	$(SDBUSPLUS_CFLAGS)
+
+test_ldflags = \
+	-lgtest_main \
+	-lgtest \
+	-pthread  \
+	$(PTHREAD_LIBS) \
+	$(SDBUSPLUS_LIBS)
+
+ipz_parser_test_CPPFLAGS = $(test_cppflags) -DIPZ_PARSER
+ipz_parser_test_LDFLAGS = $(test_ldflags)
+
+if !IBM_PARSER
 noinst_PROGRAMS = parser_test
 parser_test_SOURCES = \
 	parser/parser.cpp \
@@ -14,3 +38,4 @@
 	../utils.cpp
 parser_test_LDFLAGS = $(SDBUSPLUS_LIBS) $(PHOSPHOR_LOGGING_LIBS)
 parser_test_CXXFLAGS = $(SDBUSPLUS_CFLAGS) $(PHOSPHOR_LOGGING_CFLAGS)
+endif