From 7dc1a62311fd8cbebcd4abdb1c4b08298eabe71d Mon Sep 17 00:00:00 2001 From: Bartlomiej Kunikowski Date: Mon, 6 Mar 2017 11:01:33 +0100 Subject: [PATCH] [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 --- src/unit_tests/smoke_test.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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(); } } -- 2.7.4