[SmokeTest] Fix smoke test 43/117543/7
authorBartlomiej Kunikowski <b.kunikowski@partner.samsung.com>
Mon, 6 Mar 2017 10:01:33 +0000 (11:01 +0100)
committerjaekuk lee <juku1999@samsung.com>
Tue, 14 Mar 2017 01:11:40 +0000 (18:11 -0700)
Fix related to changes in recovery file name convention.

It repairs:
 SmokeTest.RecoveryMode_ForInstallation
 SmokeTest.RecoveryMode_ForMountInstall

And partially repairs:
 SmokeTest.RecoveryMode_ForUpdate;
 SmokeTest.RecoveryMode_ForDelta
 SmokeTest.RecoveryMode_ForMountUpdate

Change-Id: I836618dcca2a12f83a3b8d41ee3ce61998312880

src/unit_tests/smoke_test.cc

index 369b3f5..99ba20b 100644 (file)
@@ -233,7 +233,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("/wgt-recovery")
+          != std::string::npos) {
         bs::error_code error;
         bf::remove(dir_entry.path(), error);
       }
@@ -247,7 +248,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("/wgt-recovery")
+          != std::string::npos) {
         return dir_entry.path();
       }
     }