Fix recovery smoke test 58/57158/5 accepted/tizen/mobile/20160129.083349 accepted/tizen/tv/20160129.083417 accepted/tizen/wearable/20160129.083439 submit/tizen/20160127.110348
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 15 Jan 2016 12:38:56 +0000 (13:38 +0100)
committerTomasz Iwanek <t.iwanek@samsung.com>
Tue, 26 Jan 2016 15:02:25 +0000 (07:02 -0800)
Requires:
 - https://review.tizen.org/gerrit/45316

Verify by:
 $ /usr/bin/wgt-backend-ut/smoke_test --gtest_filter=SmokeTest.RecoveryMode_ForInstallation
 $ /usr/bin/wgt-backend-ut/smoke_test --gtest_filter=SmokeTest.RecoveryMode_ForUpdate

Change-Id: Iac901289fcbd17315a9d3ba4d73c1c06dbb3b18f

src/unit_tests/smoke_test.cc

index ee47203..6cabbdf 100644 (file)
@@ -63,6 +63,8 @@ class StepCrash : public ci::Step {
 
 void RemoveAllRecoveryFiles() {
   bf::path root_path = ci::GetRootAppPath();
+  if (!bf::exists(root_path))
+    return;
   for (auto& dir_entry : boost::make_iterator_range(
          bf::directory_iterator(root_path), bf::directory_iterator())) {
     if (bf::is_regular_file(dir_entry)) {
@@ -275,7 +277,7 @@ ci::AppInstaller::Result DeltaInstall(const bf::path& path,
 
 ci::AppInstaller::Result Recover(const bf::path& recovery_file,
                                  RequestResult mode = RequestResult::NORMAL) {
-  const char* argv[] = {"", "-e", recovery_file.c_str()};
+  const char* argv[] = {"", "-b", recovery_file.c_str()};
   std::unique_ptr<ci::AppQueryInterface> query_interface =
       CreateQueryInterface();
   auto pkgmgr =