Implement commit

The commit operation will serialize the binarystore protobuf and write
it to the designated sysfile location, with its size stored followed by
actual data.

Signed-off-by: Kun Yi <kunyi@google.com>
Change-Id: Idc16f410d3a1585daaddda58a3665d92a898f5c7
diff --git a/test/Makefile.am b/test/Makefile.am
index f5fe63b..cff1416 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -12,6 +12,7 @@
 # Run all 'check' test programs
 check_PROGRAMS = \
 	sys_file_unittest \
+	handler_commit_unittest \
 	handler_open_unittest \
 	handler_readwrite_unittest \
 	handler_unittest
@@ -29,6 +30,15 @@
 	-lprotobuf
 handler_unittest_CXXFLAGS = $(PHOSPHOR_LOGGING_CFLAGS)
 
+handler_commit_unittest_SOURCES = handler_commit_unittest.cpp
+handler_commit_unittest_LDADD = $(PHOSPHOR_LOGGING_LIBS) \
+	$(top_builddir)/handler.o \
+	$(top_builddir)/binarystore.o \
+	$(top_builddir)/sys_file.o \
+	$(top_builddir)/libbinarystore_la-binaryblob.pb.o \
+	-lprotobuf
+handler_commit_unittest_CXXFLAGS = $(PHOSPHOR_LOGGING_CFLAGS)
+
 handler_open_unittest_SOURCES = handler_open_unittest.cpp
 handler_open_unittest_LDADD = $(PHOSPHOR_LOGGING_LIBS) \
 	$(top_builddir)/handler.o \