From: Bartlomiej Kunikowski Date: Mon, 6 Mar 2017 10:01:33 +0000 (+0100) Subject: [SmokeTest] Fix smoke test X-Git-Tag: accepted/tizen/common/20170322.154043~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F117543%2F7;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git [SmokeTest] Fix smoke test 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 --- diff --git a/src/unit_tests/smoke_test.cc b/src/unit_tests/smoke_test.cc index 369b3f5..99ba20b 100644 --- a/src/unit_tests/smoke_test.cc +++ b/src/unit_tests/smoke_test.cc @@ -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(); } }