Fix an error on bootloadermessager test teardown

The test should not clear bcb during teardown on devices without
/misc.

Bug: 35712836
Test: The test tears down without errors after /misc removed from the fstab.
Change-Id: I42df89feb18fac5a435cd17eef97a6bad0f44545
This commit is contained in:
Tianjie Xu 2017-03-03 11:28:49 -08:00
parent 0f26468eda
commit cace743c4d

View file

@ -33,8 +33,10 @@ class BootloaderMessageTest : public ::testing::Test {
virtual void TearDown() override {
// Clear the BCB.
std::string err;
ASSERT_TRUE(clear_bootloader_message(&err)) << "Failed to clear BCB: " << err;
if (has_misc) {
std::string err;
ASSERT_TRUE(clear_bootloader_message(&err)) << "Failed to clear BCB: " << err;
}
}
bool has_misc;