Fix smoke test 32/117132/1
authorSangyoon Jang <s89.jang@samsung.com>
Fri, 3 Mar 2017 02:30:57 +0000 (11:30 +0900)
committerSangyoon Jang <s89.jang@samsung.com>
Fri, 3 Mar 2017 02:30:57 +0000 (11:30 +0900)
Recovery file format was changed.

Change-Id: I378f6c70535342b24328303401a14208d7d2c7ba
Signed-off-by: Sangyoon Jang <s89.jang@samsung.com>
src/unit_tests/smoke_test.cc

index 3ef3fed..02aaf5c 100644 (file)
@@ -136,7 +136,8 @@ void RemoveAllRecoveryFiles() {
   for (auto& dir_entry : boost::make_iterator_range(
          bf::directory_iterator(root_path), bf::directory_iterator())) {
     if (bf::is_regular_file(dir_entry)) {
-      if (dir_entry.path().string().find("/recovery") != std::string::npos) {
+      if (dir_entry.path().string().find("/tpk-recovery") !=
+          std::string::npos) {
         bs::error_code error;
         bf::remove(dir_entry.path(), error);
       }
@@ -150,9 +151,8 @@ bf::path FindRecoveryFile() {
   for (auto& dir_entry : boost::make_iterator_range(
          bf::directory_iterator(root_path), bf::directory_iterator())) {
     if (bf::is_regular_file(dir_entry)) {
-      if (dir_entry.path().string().find("/recovery") != std::string::npos) {
+      if (dir_entry.path().string().find("/tpk-recovery") != std::string::npos)
         return dir_entry.path();
-      }
     }
   }
   return {};