1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
5 #include <common/pkgmgr_interface.h>
8 #include "wgt/wgt_app_query_interface.h"
9 #include "wgt/wgt_installer.h"
11 namespace ci = common_installer;
15 class StepCrash : public ci::Step {
19 ci::Step::Status process() override {
23 ci::Step::Status clean() override { return ci::Step::Status::OK; }
24 ci::Step::Status undo() override { return ci::Step::Status::OK; }
25 ci::Step::Status precheck() override { return ci::Step::Status::OK; }
32 // this main of test binay in done purely for recovery smoke test.
33 int main(int argc, char** argv) {
34 ci::PkgmgrInstaller pkgmgr_installer;
35 wgt::WgtAppQueryInterface query_interface;
36 auto pkgmgr = ci::PkgMgrInterface::Create(argc, argv, &pkgmgr_installer,
39 LOG(ERROR) << "Options of pkgmgr installer cannot be parsed";
43 wgt::WgtInstaller installer(pkgmgr);
44 installer.AddStep<StepCrash>();
45 return (installer.Run() == ci::AppInstaller::Result::OK) ? 0 : 1;