Merge "Fuzzy_fastboot must set back the original slot after test"
This commit is contained in:
commit
d5b690993b
2 changed files with 6 additions and 0 deletions
|
|
@ -130,10 +130,14 @@ void FastBootTest::SetUp() {
|
||||||
ASSERT_EQ(device_path, cb_scratch); // The path can not change
|
ASSERT_EQ(device_path, cb_scratch); // The path can not change
|
||||||
}
|
}
|
||||||
fb = std::unique_ptr<FastBootDriver>(new FastBootDriver(transport.get(), {}, true));
|
fb = std::unique_ptr<FastBootDriver>(new FastBootDriver(transport.get(), {}, true));
|
||||||
|
// No error checking since non-A/B devices may not support the command
|
||||||
|
fb->GetVar("current-slot", &initial_slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FastBootTest::TearDown() {
|
void FastBootTest::TearDown() {
|
||||||
EXPECT_TRUE(UsbStillAvailible()) << USB_PORT_GONE;
|
EXPECT_TRUE(UsbStillAvailible()) << USB_PORT_GONE;
|
||||||
|
// No error checking since non-A/B devices may not support the command
|
||||||
|
fb->SetActive(initial_slot);
|
||||||
|
|
||||||
TearDownSerial();
|
TearDownSerial();
|
||||||
|
|
||||||
|
|
@ -232,6 +236,7 @@ void FastBootTest::SetLockState(bool unlock, bool assert_change) {
|
||||||
|
|
||||||
std::string FastBootTest::device_path = "";
|
std::string FastBootTest::device_path = "";
|
||||||
std::string FastBootTest::cb_scratch = "";
|
std::string FastBootTest::cb_scratch = "";
|
||||||
|
std::string FastBootTest::initial_slot = "";
|
||||||
int FastBootTest::serial_port = 0;
|
int FastBootTest::serial_port = 0;
|
||||||
|
|
||||||
template <bool UNLOCKED>
|
template <bool UNLOCKED>
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ class FastBootTest : public testing::Test {
|
||||||
// This is an annoying hack
|
// This is an annoying hack
|
||||||
static std::string cb_scratch;
|
static std::string cb_scratch;
|
||||||
static std::string device_path;
|
static std::string device_path;
|
||||||
|
static std::string initial_slot;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <bool UNLOCKED>
|
template <bool UNLOCKED>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue