Add a test that crashed while running clean operation 93/226093/3
authorIlho Kim <ilho159.kim@samsung.com>
Thu, 27 Feb 2020 00:17:24 +0000 (09:17 +0900)
committerilho kim <ilho159.kim@samsung.com>
Tue, 3 Mar 2020 06:01:44 +0000 (06:01 +0000)
Related:
- [tpk-backend]https://review.tizen.org/gerrit/#/c/platform/core/appfw/tpk-backend/+/226102/
- [wgt-backend]https://review.tizen.org/gerrit/#/c/platform/core/appfw/wgt-backend/+/226105/

Change-Id: I7ffe0981d586d70778413841e6baacd1f530aabd
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
src/unit_tests/common/smoke_utils.cc

index 9320de1..4b1a153 100644 (file)
@@ -648,6 +648,20 @@ void BackendInterface::CrashAfterEachStep(std::vector<std::string>* args,
       break;
   }
   ASSERT_EQ(stepCount, i);
+
+  args->push_back("-type_clean");
+  for (i = stepCount - 1; i >= 2; i--) {
+    ci::Subprocess backend_crash(
+        "/usr/bin/" + prefix + "-installer-ut/smoke-test-helper");
+    auto it = args->end();
+    it -= 2;
+    *it = std::to_string(i);
+    backend_crash.Run(*args);
+    ASSERT_NE(backend_crash.Wait(), 0);
+    if (!validator(i))
+      break;
+  }
+  ASSERT_EQ(i , 1);
 }
 
 BackendInterface::CommandResult BackendInterface::RunInstallerWithPkgrmgr(