Lines Matching refs:path
62 target_partition = Partition(partition_file.path, target_size, target_sha1); in SetUp()
69 Paths::Get().set_cache_temp_source(cache_temp_source.path); in SetUp()
73 ASSERT_TRUE(android::base::RemoveFileIfExists(cache_temp_source.path)); in TearDown()
168 std::string path = dirname + "/" + de->d_name; in FindFilesInDir() local
171 if (stat(path.c_str(), &st) == 0 && S_ISREG(st.st_mode)) { in FindFilesInDir()
189 Paths::Get().set_cache_log_directory(mock_log_dir.path); in SetUp()
215 AddFilesToDir(mock_cache.path, files); in TEST_F()
216 ASSERT_EQ(files, FindFilesInDir(mock_cache.path)); in TEST_F()
217 ASSERT_EQ(4096 * 7, MockFreeSpaceChecker(mock_cache.path)); in TEST_F()
219 ASSERT_TRUE(RemoveFilesInDirectory(4096 * 9, mock_cache.path, MockFreeSpaceChecker)); in TEST_F()
221 ASSERT_EQ(std::vector<std::string>{ "file3" }, FindFilesInDir(mock_cache.path)); in TEST_F()
222 ASSERT_EQ(4096 * 9, MockFreeSpaceChecker(mock_cache.path)); in TEST_F()
227 AddFilesToDir(mock_cache.path, files); in TEST_F()
228 ASSERT_EQ(files, FindFilesInDir(mock_cache.path)); in TEST_F()
229 ASSERT_EQ(4096 * 7, MockFreeSpaceChecker(mock_cache.path)); in TEST_F()
232 RemoveFilesInDirectory(4096 * 9, mock_cache.path, [](const std::string&) { return -1; })); in TEST_F()
237 AddFilesToDir(mock_cache.path, files); in TEST_F()
238 ASSERT_EQ(files, FindFilesInDir(mock_cache.path)); in TEST_F()
239 ASSERT_EQ(4096 * 8, MockFreeSpaceChecker(mock_cache.path)); in TEST_F()
241 std::string file1_path = mock_cache.path + "/file1"s; in TEST_F()
245 ASSERT_FALSE(RemoveFilesInDirectory(4096 * 10, mock_cache.path, MockFreeSpaceChecker)); in TEST_F()
247 ASSERT_EQ(std::vector<std::string>{ "file1" }, FindFilesInDir(mock_cache.path)); in TEST_F()
253 AddFilesToDir(mock_log_dir.path, log_files); in TEST_F()
254 ASSERT_EQ(4096 * 5, MockFreeSpaceChecker(mock_log_dir.path)); in TEST_F()
256 ASSERT_TRUE(RemoveFilesInDirectory(4096 * 8, mock_log_dir.path, MockFreeSpaceChecker)); in TEST_F()
260 ASSERT_EQ(expected, FindFilesInDir(mock_log_dir.path)); in TEST_F()
261 ASSERT_EQ(4096 * 8, MockFreeSpaceChecker(mock_log_dir.path)); in TEST_F()
267 AddFilesToDir(mock_log_dir.path, log_files); in TEST_F()
268 ASSERT_EQ(4096 * 6, MockFreeSpaceChecker(mock_log_dir.path)); in TEST_F()
270 ASSERT_TRUE(RemoveFilesInDirectory(4096 * 9, mock_log_dir.path, MockFreeSpaceChecker)); in TEST_F()
275 ASSERT_EQ(expected, FindFilesInDir(mock_log_dir.path)); in TEST_F()
276 ASSERT_EQ(4096 * 9, MockFreeSpaceChecker(mock_log_dir.path)); in TEST_F()
282 AddFilesToDir(mock_log_dir.path, log_files); in TEST_F()
283 ASSERT_EQ(4096 * 5, MockFreeSpaceChecker(mock_log_dir.path)); in TEST_F()
285 ASSERT_FALSE(RemoveFilesInDirectory(4096 * 8, mock_log_dir.path, MockFreeSpaceChecker)); in TEST_F()
289 ASSERT_EQ(expected, FindFilesInDir(mock_log_dir.path)); in TEST_F()