#include <gum/gum-user-service.h>
#include <gum/common/gum-user-types.h>
#include <manifest_parser/utils/version_number.h>
-#include <pkgmgr_parser_db.h>
#include <boost/filesystem/path.hpp>
#include <gtest/gtest.h>
// common entries
const std::vector<std::string> kDBEntries = {
{".pkgmgr_parser.db"},
- {".pkgmgr_parser.db-shm"},
- {".pkgmgr_parser.db-wal"},
+ {".pkgmgr_parser.db-journal"},
{".pkgmgr_cert.db"},
- {".pkgmgr_cert.db-shm"},
- {".pkgmgr_cert.db-wal"},
+ {".pkgmgr_cert.db-journal"},
{".app2sd.db"},
{".app2sd.db-journal"},
};
return true;
}
-bool InitTestDB(uid_t test_uid) {
- if (pkgmgr_parser_create_and_initialize_db(test_uid) < 0) {
- LOG(ERROR) << "Failed to initialize db for uid : " << test_uid;
- return false;
- }
- return true;
-}
-
std::vector<bf::path> SetupBackupDirectories(uid_t test_uid) {
std::vector<bf::path> entries;
bf::path db_dir = bf::path(tzplatform_getenv(TZ_SYS_DB));
bool RestorePath(const boost::filesystem::path& path);
-bool InitTestDB(uid_t test_uid);
-
std::vector<boost::filesystem::path> SetupBackupDirectories(uid_t test_uid);
void UninstallAllAppsInDirectory(boost::filesystem::path dir, bool is_preload,