tools: remove phosphor-ipmi-blobs dependency
The host tool depended on the BMC header: firmware_handler.hpp because
it defined the flags. This header depends on phosphor-ipmi-blobs,
therefore the host-tool depends on this. Move the flags into a separate
common header file and snip this dependency.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Id2ad33a1611c02605a1ed5c695429d0451eb98d4
diff --git a/bmc/test/firmware_sessionstat_unittest.cpp b/bmc/test/firmware_sessionstat_unittest.cpp
index d2d1896..dcb16d9 100644
--- a/bmc/test/firmware_sessionstat_unittest.cpp
+++ b/bmc/test/firmware_sessionstat_unittest.cpp
@@ -30,8 +30,7 @@
EXPECT_CALL(imageMock, open("asdf")).WillOnce(Return(true));
EXPECT_TRUE(handler->open(
- 0, blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi,
- "asdf"));
+ 0, blobs::OpenFlags::write | FirmwareFlags::UpdateFlags::ipmi, "asdf"));
int size = 512;
EXPECT_CALL(imageMock, getSize()).WillOnce(Return(size));
@@ -39,7 +38,7 @@
blobs::BlobMeta meta;
EXPECT_TRUE(handler->stat(0, &meta));
EXPECT_EQ(meta.blobState,
- blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi);
+ blobs::OpenFlags::write | FirmwareFlags::UpdateFlags::ipmi);
EXPECT_EQ(meta.size, size);
EXPECT_EQ(meta.metadata.size(), 0);
}
@@ -54,8 +53,7 @@
EXPECT_CALL(imageMock, open("asdf")).WillOnce(Return(true));
EXPECT_TRUE(handler->open(
- 0, blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::lpc,
- "asdf"));
+ 0, blobs::OpenFlags::write | FirmwareFlags::UpdateFlags::lpc, "asdf"));
int size = 512;
EXPECT_CALL(imageMock, getSize()).WillOnce(Return(size));
@@ -65,7 +63,7 @@
blobs::BlobMeta meta;
EXPECT_TRUE(handler->stat(0, &meta));
EXPECT_EQ(meta.blobState,
- blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::lpc);
+ blobs::OpenFlags::write | FirmwareFlags::UpdateFlags::lpc);
EXPECT_EQ(meta.size, size);
EXPECT_EQ(meta.metadata.size(), mBytes.size());
EXPECT_EQ(meta.metadata[0], mBytes[0]);