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_commit_unittest.cpp b/bmc/test/firmware_commit_unittest.cpp
index b8c651e..a6ab172 100644
--- a/bmc/test/firmware_commit_unittest.cpp
+++ b/bmc/test/firmware_commit_unittest.cpp
@@ -1,5 +1,6 @@
#include "data_mock.hpp"
#include "firmware_handler.hpp"
+#include "flags.hpp"
#include "image_mock.hpp"
#include "triggerable_mock.hpp"
#include "util.hpp"
@@ -33,7 +34,7 @@
};
data = {
- {FirmwareBlobHandler::UpdateFlags::ipmi, nullptr},
+ {FirmwareFlags::UpdateFlags::ipmi, nullptr},
};
}
};
@@ -55,8 +56,7 @@
EXPECT_CALL(imageMock2, 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"));
EXPECT_FALSE(handler->commit(0, {}));
}
@@ -78,7 +78,7 @@
EXPECT_CALL(imageMock1, open(StrEq(hashBlobId))).WillOnce(Return(true));
EXPECT_TRUE(handler->open(
- 0, blobs::OpenFlags::write | FirmwareBlobHandler::UpdateFlags::ipmi,
+ 0, blobs::OpenFlags::write | FirmwareFlags::UpdateFlags::ipmi,
hashBlobId));
EXPECT_FALSE(handler->commit(0, {}));