class StepGenerateXml : public common_installer::Step {
public:
using Step::Step;
+ explicit StepGenerateXml(common_installer::InstallerContext* context)
+ : Step(context), wgt_doc_(nullptr), tpk_doc_(nullptr) {}
Status process() override;
Status clean() override { return Status::OK; }
Status undo() override { return Status::OK; }
} // namespace common_installer
int main(int argc, char** argv) {
- ci::RequestMode request_mode = ParseRequestMode(argc, argv);
- if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
- std::cout << "Skip tests for preload request" << std::endl;
- ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ try {
+ ci::RequestMode request_mode = ParseRequestMode(argc, argv);
+ if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL) {
+ std::cout << "Skip tests for preload request" << std::endl;
+ ::testing::GTEST_FLAG(filter) = "SmokeTest.*";
+ }
+ testing::InitGoogleTest(&argc, argv);
+ env = testing::AddGlobalTestEnvironment(
+ new common_installer::SmokeEnvironment(request_mode));
+ signal(SIGINT, signalHandler);
+ signal(SIGSEGV, signalHandler);
+ return RUN_ALL_TESTS();
+ } catch (...) {
+ std::cout << "Exception occurred during testing";
+ return 1;
}
- testing::InitGoogleTest(&argc, argv);
- env = testing::AddGlobalTestEnvironment(
- new common_installer::SmokeEnvironment(request_mode));
- signal(SIGINT, signalHandler);
- signal(SIGSEGV, signalHandler);
- return RUN_ALL_TESTS();
}
calloc(1, sizeof(metadata_x)));
if (!item) {
LOG(ERROR) << "Out of memory";
+ pkgmgrinfo_basic_free_application(application);
return false;
}
item->key = strdup(pair.first.c_str());
if (!FillManifestX(manifest)) {
LOG(ERROR) << "[Parse] Storing manifest_x failed. "
<< parser_->GetErrorMessage();
+ pkgmgr_parser_free_manifest_xml(manifest);
return common_installer::Step::Status::PARSE_ERROR;
}