version-handler: add version-handler, blob handler
Implement version-handler: a blob handler for retrieving version
information about a blob.
Problem: ipmi-flash(firmware-handler) provides a mechanism to transfer
firmware updates, verify them and perform updates but there is no
mechanism to interrogate the firmware for its version.
Solution: version-handler provides handlers for retrieving information
about firmware blobs. Adding "version" syntax to "/flash/blob" entries
in the json configuration file enables this feature.
The mechanism to retrieve version is identical to the mechanism used by
firmware-handler to perform preparation, verification and updates (kick
off systemd targets).
Signed-off-by: Jason Ling <jasonling@google.com>
Change-Id: I28868ca8dd76d63af668d2e46b9359401d45f0bc
diff --git a/bmc/version-handler/test/Makefile.am b/bmc/version-handler/test/Makefile.am
index 94c398d..0c02ff0 100644
--- a/bmc/version-handler/test/Makefile.am
+++ b/bmc/version-handler/test/Makefile.am
@@ -3,6 +3,7 @@
AM_CPPFLAGS = \
-I$(top_srcdir)/ \
-I$(top_srcdir)/bmc/ \
+ -I$(top_srcdir)/bmc/test \
-I$(top_srcdir)/bmc/version-handler \
$(GTEST_CFLAGS) \
$(GMOCK_CFLAGS) \
@@ -22,9 +23,29 @@
# Run all 'check' test programs
check_PROGRAMS = \
- version_json_unittest
+ version_json_unittest \
+ version_canhandle_enumerate_unittest \
+ version_createhandler_unittest \
+ version_open_unittest \
+ version_close_unittest \
+ version_read_unittest
TESTS = $(check_PROGRAMS)
version_json_unittest_SOURCES = version_json_unittest.cpp
version_json_unittest_LDADD = $(top_builddir)/bmc/version-handler/libversionblob_common.la
+
+version_canhandle_enumerate_unittest_SOURCES = version_canhandle_enumerate_unittest.cpp
+version_canhandle_enumerate_unittest_LDADD = $(top_builddir)/bmc/version-handler/libversionblob_common.la
+
+version_createhandler_unittest_SOURCES = version_createhandler_unittest.cpp
+version_createhandler_unittest_LDADD = $(top_builddir)/bmc/version-handler/libversionblob_common.la
+
+version_open_unittest_SOURCES = version_open_unittest.cpp
+version_open_unittest_LDADD = $(top_builddir)/bmc/version-handler/libversionblob_common.la
+
+version_close_unittest_SOURCES = version_close_unittest.cpp
+version_close_unittest_LDADD = $(top_builddir)/bmc/version-handler/libversionblob_common.la
+
+version_read_unittest_SOURCES = version_read_unittest.cpp
+version_read_unittest_LDADD = $(top_builddir)/bmc/version-handler/libversionblob_common.la