Switch to bionic gtest in bootable/recovery
We encountered segfaults in Imgdiff host tests due to the failure to reset states of getopt. The problem can be solved by switching to use bionic's gtest where a new process is forked for each test. Also modify the recovery_component_test to make sure it runs in parallel. Changes include: 1. Merge the writes to misc partition into one single test. 2. Change the hard coded location "/cache/saved.file" into a configurable variable. Bug: 67849209 Test: recovery tests pass Change-Id: I165d313f32b83393fb7922c5078636ac40b50bc2
This commit is contained in:
@@ -36,12 +36,11 @@ struct FileContents {
|
||||
struct stat st;
|
||||
};
|
||||
|
||||
// When there isn't enough room on the target filesystem to hold the
|
||||
// patched version of the file, we copy the original here and delete
|
||||
// it to free up space. If the expected source file doesn't exist, or
|
||||
// is corrupted, we look to see if this file contains the bits we want
|
||||
// and use it as the source instead.
|
||||
#define CACHE_TEMP_SOURCE "/cache/saved.file"
|
||||
// When there isn't enough room on the target filesystem to hold the patched version of the file,
|
||||
// we copy the original here and delete it to free up space. If the expected source file doesn't
|
||||
// exist, or is corrupted, we look to see if the cached file contains the bits we want and use it as
|
||||
// the source instead. The default location for the cached source is "/cache/saved.file".
|
||||
extern std::string cache_temp_source;
|
||||
|
||||
using SinkFn = std::function<size_t(const unsigned char*, size_t)>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user