std::string pkgid = "recoverypkg";
bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
- ASSERT_FALSE(recovery_file.empty());
ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
} else {
std::string exec = "recoverypkg";
bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
- ASSERT_FALSE(recovery_file.empty());
std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
GetRecoverFileInfo(recovery_file);
ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
params.test_user.uid);
bf::path root_path = ci::GetRootAppPath(params.is_readonly,
params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
- ASSERT_FALSE(recovery_file.empty());
std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
GetRecoverFileInfo(recovery_file);
ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
std::string pkgid = "recoverypkg";
bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
- ASSERT_FALSE(recovery_file.empty());
ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
} else {
std::string exec = "recoverypkg";
bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
params.test_user.uid);
+ if (recovery_file.empty()) {
+ std::cout << "recovery file dosen't exist, "
+ "this test is skipped" << std::endl;
+ return;
+ }
// Filesystem may be mounted after crash
ScopedTzipInterface poweroff_unmount_interface(pkgid, params.test_user.uid);
poweroff_unmount_interface.Release();
- ASSERT_FALSE(recovery_file.empty());
ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
ScopedTzipInterface interface(pkgid, params.test_user.uid);
ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));