Reboot test: Initialize fake clock
[ Merge of http://go/wvgerrit/143630 ] When we run a test with the fake clock, the clock had been initialized to the current time, or to 0. This causes a problem for reboot tests because the clock might go backwards over the reboot. With this change, we monitor the clock at the end of one reboot pass and initialize the clock for the next pass based on the previous value. Bug: 26163469 Test: GtsMediaTestCases on sunfish Change-Id: Ibd0024f963634382af70553fced38da6e1d857d2
This commit is contained in:
@@ -36,6 +36,12 @@ class RebootTest : public WvCdmTestBaseWithEngine {
|
||||
|
||||
static int test_pass() { return default_config_.test_pass(); }
|
||||
|
||||
// Load a previously saved time. Returns 0 if the value does not exist or
|
||||
// cannot be parsed.
|
||||
int64_t LoadTime(const std::string& key);
|
||||
// Save a time to persistent storage.
|
||||
void SaveTime(const std::string& key, int64_t time);
|
||||
|
||||
protected:
|
||||
void SetUp() override;
|
||||
void TearDown() override;
|
||||
|
||||
Reference in New Issue
Block a user