tools: add missing updater unit-tests
Add missing updater unit-tests to prevent regressions moving forward in
development.
Change-Id: I33c8052fc62cd645059bcba6c5111063e4348e0c
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/updater.cpp b/tools/updater.cpp
index b79979c..b9574d8 100644
--- a/tools/updater.cpp
+++ b/tools/updater.cpp
@@ -46,7 +46,8 @@
* is supported.
*/
auto stat = blob->getStat(goalFirmware);
- if ((stat.blob_state & handler->supportedType()) == 0)
+ auto supported = handler->supportedType();
+ if ((stat.blob_state & supported) == 0)
{
throw ToolException("data interface selected not supported.");
}
@@ -55,7 +56,7 @@
std::uint16_t session;
try
{
- session = blob->openBlob(goalFirmware, handler->supportedType());
+ session = blob->openBlob(goalFirmware, supported);
}
catch (const BlobException& b)
{