Remove boost dependency 50/303650/5
authorSangyoon Jang <jeremy.jang@samsung.com>
Wed, 3 Jan 2024 05:18:15 +0000 (14:18 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Fri, 16 Feb 2024 08:14:09 +0000 (17:14 +0900)
Requires:
 - https://review.tizen.org/gerrit/c/platform/core/appfw/app-installers/+/303330

Change-Id: Ie11667af3790c4ed2f59476d7d51a484fedcc333
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
33 files changed:
CMakeLists.txt
packaging/tpk-backend.spec
src/lib/CMakeLists.txt
src/lib/tpk_archive_info.cc
src/lib/tpk_archive_info.h
src/tpk/CMakeLists.txt
src/tpk/step/configuration/step_check_reinstall_manifest.cc
src/tpk/step/filesystem/step_check_pkg_directory_path.cc
src/tpk/step/filesystem/step_create_tpk_symbolic_link.cc
src/tpk/step/filesystem/step_tpk_patch_icons.cc
src/tpk/step/filesystem/step_tpk_patch_icons.h
src/tpk/step/filesystem/step_tpk_prepare_package_directory.cc
src/tpk/step/filesystem/step_tpk_prepare_package_directory.h
src/tpk/step/pkgmgr/step_convert_xml.cc
src/tpk/step/pkgmgr/step_convert_xml.h
src/tpk/step/pkgmgr/step_manifest_adjustment.cc
src/tpk/step/pkgmgr/step_manifest_adjustment.h
src/tpk/step/security/step_tpk_recover_signature.cc
src/tpk/step/security/step_tpk_recover_signature.h
src/tpk/tpk_app_query_interface.cc
test/smoke_tests/CMakeLists.txt
test/smoke_tests/extensive_smoke_test.cc
test/smoke_tests/manifest_test.cc
test/smoke_tests/manifest_test.h
test/smoke_tests/manifest_test_package.cc
test/smoke_tests/manifest_test_service_application.cc
test/smoke_tests/manifest_test_ui_application.cc
test/smoke_tests/manifest_test_watch_application.cc
test/smoke_tests/manifest_test_widget_application.cc
test/smoke_tests/recovery_test.cc
test/smoke_tests/smoke_test.cc
test/smoke_tests/tpk_smoke_utils.cc
test/smoke_tests/tpk_smoke_utils.h

index a9db976f6566dd1f5367f3d52bbd5101005e6601..be15707ba9fcc71156b81837ce1d80e3270740e1 100644 (file)
@@ -13,12 +13,12 @@ ENDIF(NOT CMAKE_BUILD_TYPE)
 # Compiler flags
 SET(EXTRA_FLAGS "-Wall -Wextra")
 SET(CMAKE_C_FLAGS_PROFILING    "-O2 -flto ${EXTRA_FLAGS}")
-SET(CMAKE_CXX_FLAGS_PROFILING  "-O2 -flto -std=c++14 ${EXTRA_FLAGS}")
+SET(CMAKE_CXX_FLAGS_PROFILING  "-O2 -flto -std=c++17 ${EXTRA_FLAGS}")
 SET(CMAKE_C_FLAGS_DEBUG        "-O0 -g ${EXTRA_FLAGS}")
-SET(CMAKE_CXX_FLAGS_DEBUG      "-O0 -std=c++14 -g ${EXTRA_FLAGS}")
+SET(CMAKE_CXX_FLAGS_DEBUG      "-O0 -std=c++17 -g ${EXTRA_FLAGS}")
 SET(CMAKE_C_FLAGS_RELEASE      "-O2 -flto -g ${EXTRA_FLAGS}")
-SET(CMAKE_CXX_FLAGS_RELEASE    "-O2 -flto -std=c++14 -g ${EXTRA_FLAGS}")
-SET(CMAKE_CXX_FLAGS_CCOV       "-O0 -std=c++14 -g --coverage ${EXTRA_FLAGS}")
+SET(CMAKE_CXX_FLAGS_RELEASE    "-O2 -flto -std=c++17 -g ${EXTRA_FLAGS}")
+SET(CMAKE_CXX_FLAGS_CCOV       "-O0 -std=c++17 -g --coverage ${EXTRA_FLAGS}")
 
 # Linker flags
 SET(EXTRA_LINKER_FLAGS "-Wl,--as-needed")
@@ -54,7 +54,5 @@ PKG_CHECK_MODULES(TTRACE_DEPS REQUIRED ttrace)
 PKG_CHECK_MODULES(GUM_DEPS REQUIRED libgum)
 PKG_CHECK_MODULES(GMOCK_DEPS REQUIRED gmock)
 
-FIND_PACKAGE(Boost REQUIRED COMPONENTS system filesystem regex program_options)
-
 ADD_SUBDIRECTORY(src)
 ADD_SUBDIRECTORY(test)
index bb0000a388d7d89dca8c79dd0d231383a5651c2f..f590eba8168638f06e730511efeeb56dd389d28d 100644 (file)
@@ -10,7 +10,6 @@ Source1001:     tpk-installer.manifest
 Source1002:     tpk-installer-tests.manifest
 
 Requires:       tpk-installer = %{version}
-BuildRequires:  boost-devel
 BuildRequires:  cmake
 BuildRequires:  app-installers-tests
 BuildRequires:  pkgconfig(app-installers)
index c25e68e808442974ca3c4a4a3df411efc074ad4e..d1ad54d47e1d29c8266f12a00fd63b3e8ffad247 100644 (file)
@@ -10,7 +10,6 @@ APPLY_PKG_CONFIG(${TARGET_LIBNAME_TPK_ARCHIVE_INFO} PUBLIC
   MANIFEST_PARSER_DEPS
   TPK_MANIFEST_HANDLERS_DEPS
   VCONF_DEPS
-  Boost
 )
 
 INSTALL(TARGETS ${TARGET_LIBNAME_TPK_ARCHIVE_INFO} DESTINATION ${SYSCONF_INSTALL_DIR}/package-manager/backendlib)
index 73a288b3164f5dc4d68f21580975aac4c761d9f6..582fa5c904bbf97838df84889581e7c18ca6ea9c 100644 (file)
@@ -6,8 +6,6 @@
 
 #include <vconf.h>
 
-#include <boost/filesystem/path.hpp>
-
 #include <tpk_manifest_handlers/tpk_config_parser.h>
 #include <tpk_manifest_handlers/application_manifest_constants.h>
 #include <tpk_manifest_handlers/author_handler.h>
 
 #include <cstdlib>
 #include <cstring>
+#include <filesystem>
 #include <fstream>
 #include <string>
 #include <vector>
 
-namespace bf = boost::filesystem;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 namespace {
 
@@ -41,7 +40,7 @@ const char kSharedResDir[] = "shared/res";
 
 bool TpkArchiveInfo::ExtractPackageArchive(const std::string& archive_path,
     const std::string& file, const std::string& tmp_dir) {
-  if (!ci::ExtractToTmpDir(archive_path.c_str(), bf::path(tmp_dir),
+  if (!ci::ExtractToTmpDir(archive_path.c_str(), fs::path(tmp_dir),
           file.c_str())) {
     LOG(ERROR) << "Failed to extract";
     return false;
@@ -203,12 +202,12 @@ bool TpkArchiveInfo::GetIconInfo(const tpk::parse::TPKConfigParser& parser,
   return false;
 }
 
-bool TpkArchiveInfo::ReadIcon(const bf::path& icon, const bf::path& tmp_dir) {
-  bf::path icon_path = tmp_dir / icon;
+bool TpkArchiveInfo::ReadIcon(const fs::path& icon, const fs::path& tmp_dir) {
+  fs::path icon_path = tmp_dir / icon;
 
   LOG(INFO) << "Icon file path: " << icon_path;
 
-  if (!bf::exists(icon_path)) {
+  if (!fs::exists(icon_path)) {
     LOG(WARNING) << "Icon file doesn't actually exist, skip reading icon";
     return true;
   }
@@ -237,7 +236,7 @@ bool TpkArchiveInfo::ReadIcon(const bf::path& icon, const bf::path& tmp_dir) {
 }
 
 bool TpkArchiveInfo::LoadArchiveInfo() {
-  bf::path tmp_dir = ci::GenerateTmpDir("/tmp");
+  fs::path tmp_dir = ci::GenerateTmpDir("/tmp");
 
   if (!ci::CreateDir(tmp_dir))
     return false;
@@ -247,7 +246,7 @@ bool TpkArchiveInfo::LoadArchiveInfo() {
     return false;
 
   tpk::parse::TPKConfigParser parser;
-  bf::path manifest_path = tmp_dir / kManifestFileName;
+  fs::path manifest_path = tmp_dir / kManifestFileName;
   if (!parser.ParseManifest(manifest_path)) {
     LOG(ERROR) << "Failed to parse";
     return false;
@@ -284,7 +283,7 @@ bool TpkArchiveInfo::LoadArchiveInfo() {
 
   free(locale);
   if (!icon_.empty()) {
-    bf::path icon_path = bf::path(kSharedResDir) / icon_;
+    fs::path icon_path = fs::path(kSharedResDir) / icon_;
     if (!ExtractPackageArchive(path_, icon_path.string(), tmp_dir.string())) {
       RemoveTmpDir(tmp_dir.string());
       return false;
index e54b8bac05d223fc9407b59fd769cefb20096b6f..e3d0c1a63cead367ad7b716e375b685e16dd7646 100644 (file)
@@ -5,15 +5,14 @@
 #ifndef LIB_TPK_ARCHIVE_INFO_H_
 #define LIB_TPK_ARCHIVE_INFO_H_
 
-#include <boost/filesystem/path.hpp>
-
 #include <common/archive_info.h>
 #include <tpk_manifest_handlers/tpk_config_parser.h>
 #include <manifest_parser/utils/logging.h>
 
+#include <filesystem>
 #include <string>
 
-namespace bf = boost::filesystem;
+namespace fs = std::filesystem;
 
 class TpkArchiveInfo : public common_installer::ArchiveInfo {
  public:
@@ -81,7 +80,7 @@ class TpkArchiveInfo : public common_installer::ArchiveInfo {
       const char* locale);
   bool GetIconInfo(const tpk::parse::TPKConfigParser& parser,
       const char* locale);
-  bool ReadIcon(const bf::path& icon, const bf::path& tmp_dir);
+  bool ReadIcon(const fs::path& icon, const fs::path& tmp_dir);
 
   SCOPE_LOG_TAG(TpkArchiveInfo)
 };
index 33d8d23cd7207b628cd40a261102f3e4612c8e5e..1ea8e6e4b91aba8c602d9f2a4bd2386f69c70c31 100644 (file)
@@ -25,7 +25,6 @@ APPLY_PKG_CONFIG(${TARGET_LIBNAME_TPK} PUBLIC
   CAPI_SYSTEM_INFO_DEPS
   TTRACE_DEPS
   VCONF_DEPS
-  Boost
 )
 
 TARGET_LINK_LIBRARIES(${TARGET_TPK_BACKEND} PRIVATE ${TARGET_LIBNAME_TPK})
index 7e6b22f47a790f397586bcd1b169c4f3cdfe9a7a..e5f606cfcfe68fc6d31b31421b7a3f5bf0a09ee5 100644 (file)
@@ -4,14 +4,11 @@
 
 #include "tpk/step/configuration/step_check_reinstall_manifest.h"
 
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
-#include <boost/system/error_code.hpp>
-
 #include <common/utils/file_util.h>
 
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
+#include <filesystem>
+
+namespace fs = std::filesystem;
 
 namespace {
 
@@ -23,14 +20,14 @@ namespace tpk {
 namespace configuration {
 
 common_installer::Step::Status StepCheckReinstallManifest::process() {
-  bf::path target = context_->unpacked_dir_path.get() / kManifest;
+  fs::path target = context_->unpacked_dir_path.get() / kManifest;
 
-  if (bf::exists(target))
+  if (fs::exists(target))
     return Status::OK;
 
-  bf::path source = context_->root_application_path.get() /
+  fs::path source = context_->root_application_path.get() /
       context_->pkgid.get() / kManifest;
-  if (!bf::exists(source)) {
+  if (!fs::exists(source)) {
     LOG(ERROR) << "Cannot find old manifest file";
     return Status::APP_DIR_ERROR;
   }
index a43a04f0ea9c569806043471e9179fe9b39758f7..b659f7d61685cedc1180a137180e86570798891e 100644 (file)
@@ -4,19 +4,18 @@
 
 #include "tpk/step/filesystem/step_check_pkg_directory_path.h"
 
-#include <boost/filesystem.hpp>
+#include <filesystem>
 #include <string>
 
 #include <common/utils/file_util.h>
 
+namespace fs = std::filesystem;
+
 namespace tpk {
 namespace filesystem {
 
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
-
 common_installer::Step::Status StepCheckPkgDirPath::process() {
-  if (bf::exists(context_->GetPkgPath()))
+  if (fs::exists(context_->GetPkgPath()))
     return Status::OK;
 
   LOG(INFO) << "Create pkg_path(" << context_->GetPkgPath()
index 1b5b6b7da94c3e40b141aae6813b23325186bfe5..8340c37da8abc328ee979d08abd4f78e71ca2d88 100644 (file)
@@ -2,9 +2,6 @@
 
 #include "tpk/step/filesystem/step_create_tpk_symbolic_link.h"
 
-#include <boost/filesystem.hpp>
-#include <boost/system/error_code.hpp>
-
 #include <common/installer/app_installer.h>
 #include <common/step/step.h>
 #include <common/installer_context.h>
 
 #include <pkgmgr-info.h>
 
+#include <filesystem>
 #include <iostream>
+#include <system_error>
+
+namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 namespace tpk {
 namespace filesystem {
 
-namespace bf = boost::filesystem;
-namespace ci = common_installer;
-
 using common_installer::InstallerContext;
 typedef common_installer::Step::Status Status;
 
-bool CreateUGClientSymlink(const bf::path& app_exec_path) {
-  bf::path ug_client_path(tzplatform_mkpath(TZ_SYS_BIN, "ug-client"));
+bool CreateUGClientSymlink(const fs::path& app_exec_path) {
+  fs::path ug_client_path(tzplatform_mkpath(TZ_SYS_BIN, "ug-client"));
 
   LOG(INFO) << "Createing symlink " << app_exec_path << " pointing " <<
     ug_client_path;
-  boost::system::error_code error;
-  bf::create_symlink(ug_client_path, app_exec_path, error);
+  std::error_code error;
+  fs::create_symlink(ug_client_path, app_exec_path, error);
   if (error) {
     LOG(ERROR) << "Symlink creation failure: " << app_exec_path
                << ", error :" << error.message();
@@ -41,10 +40,10 @@ bool CreateUGClientSymlink(const bf::path& app_exec_path) {
 }
 
 bool CreateSymLink(application_x* app, InstallerContext* context) {
-  bf::path bindir = context->GetPkgPath() / bf::path("bin");
+  fs::path bindir = context->GetPkgPath() / fs::path("bin");
 
   LOG(DEBUG) << "Creating dir: " << bindir;
-  if (!bf::is_symlink(symlink_status(bindir)) &&
+  if (!fs::is_symlink(symlink_status(bindir)) &&
       !common_installer::CreateDir(bindir)) {
     LOG(ERROR) << "Directory creation failure: " << bindir;
     return false;
@@ -53,8 +52,8 @@ bool CreateSymLink(application_x* app, InstallerContext* context) {
   if (!app->ui_gadget || strcmp(app->ui_gadget, "true") != 0)
     return true;
 
-  bf::path app_exec_path(app->exec);
-  if (bf::exists(app_exec_path))
+  fs::path app_exec_path(app->exec);
+  if (fs::exists(app_exec_path))
     return true;
 
   if (!CreateUGClientSymlink(app_exec_path))
index 5fa5a32b95254d4c513838a1a1380fabef7d51e6..a0f242c352fbd9f609e0b5310e84ce7cb0ceaaa9 100644 (file)
@@ -4,39 +4,38 @@
 
 #include "tpk/step/filesystem/step_tpk_patch_icons.h"
 
-#include <boost/filesystem/operations.hpp>
-#include <boost/system/error_code.hpp>
 #include <common/utils/file_util.h>
 #include <common/utils/glist_range.h>
 #include <pkgmgr-info.h>
 
 #include <cstring>
+#include <filesystem>
 #include <string>
+#include <system_error>
 #include <vector>
 
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
+namespace fs = std::filesystem;
 
 namespace {
 
 // This function checks for alternative locations of icon file of tpk package
-bf::path LocateIcon(const bf::path& filename, const std::string& pkgid,
-                    const bf::path& root_path, uid_t uid, bool is_readonly) {
-  std::vector<bf::path> locations;
+fs::path LocateIcon(const fs::path& filename, const std::string& pkgid,
+                    const fs::path& root_path, uid_t uid, bool is_readonly) {
+  std::vector<fs::path> locations;
   // FIXME: icons for readonly apps should also be moved to "shared/res"
   const char* extra_icon_path = getIconPath(uid, is_readonly);
   if (extra_icon_path) {
-    bf::path system_location = bf::path(extra_icon_path) / filename;
-    bf::path small_system_location =
-        bf::path(extra_icon_path) / "default" / "small" / filename;
+    fs::path system_location = fs::path(extra_icon_path) / filename;
+    fs::path small_system_location =
+        fs::path(extra_icon_path) / "default" / "small" / filename;
     locations.push_back(system_location);
     locations.push_back(small_system_location);
   }
-  bf::path res_icons_location = root_path / pkgid / "res" / "icons" / filename;
+  fs::path res_icons_location = root_path / pkgid / "res" / "icons" / filename;
   locations.push_back(res_icons_location);
 
   for (auto& location : locations) {
-    if (bf::exists(location))
+    if (fs::exists(location))
       return location;
   }
 
@@ -53,9 +52,9 @@ namespace tpk {
 namespace filesystem {
 
 common_installer::Step::Status StepTpkPatchIcons::ProcessIconOutsidePackage(
-    const bf::path& common_icon_location, const bf::path& icon_text,
+    const fs::path& common_icon_location, const fs::path& icon_text,
     application_x* app, icon_x* icon) {
-  bf::path destination = common_icon_location / app->appid;
+  fs::path destination = common_icon_location / app->appid;
 
   if (!icon_text.extension().empty())
     destination += icon_text.extension();
@@ -76,8 +75,8 @@ common_installer::Step::Status StepTpkPatchIcons::ProcessIconOutsidePackage(
 }
 
 common_installer::Step::Status StepTpkPatchIcons::FixIconLocation(
-    const bf::path& icon_text) {
-  bf::path source = LocateIcon(icon_text.filename(),
+    const fs::path& icon_text) {
+  fs::path source = LocateIcon(icon_text.filename(),
                                context_->pkgid.get(),
                                context_->root_application_path.get(),
                                context_->uid.get(),
@@ -93,10 +92,10 @@ common_installer::Step::Status StepTpkPatchIcons::FixIconLocation(
 }
 
 common_installer::Step::Status StepTpkPatchIcons::process() {
-  bf::path common_icon_location = context_->GetPkgPath() / "shared" / "res";
+  fs::path common_icon_location = context_->GetPkgPath() / "shared" / "res";
 
-  bs::error_code error;
-  bf::create_directories(common_icon_location, error);
+  std::error_code error;
+  fs::create_directories(common_icon_location, error);
   if (error) {
       LOG(ERROR) << "Failed to create directory :" << common_icon_location
                  << ", error :"  << error.message();
@@ -109,7 +108,7 @@ common_installer::Step::Status StepTpkPatchIcons::process() {
       continue;
 
     for (auto& icon : GListRange<icon_x*>(app->icon)) {
-      bf::path icon_text(icon->text);
+      fs::path icon_text(icon->text);
       if (icon_text.parent_path() != common_icon_location) {
         // if location of icon was absolute and icon is not in common icon
         // location, we just need to copy it and replace icon->text to insert
@@ -138,7 +137,7 @@ common_installer::Step::Status StepTpkPatchIcons::process() {
         }
       } else {
         // look for icon in different location if it doesn't exist
-        if (!bf::exists(icon_text)) {
+        if (!fs::exists(icon_text)) {
           Status status = FixIconLocation(icon_text);
           if (status != Status::OK)
             return status;
index 1458cbfe6a6b7738f08447e18491af76421aaddd..3930b5a1754d1edb30d6c59eee8c89a32d0bfcad 100644 (file)
@@ -5,11 +5,11 @@
 #ifndef TPK_STEP_FILESYSTEM_STEP_TPK_PATCH_ICONS_H_
 #define TPK_STEP_FILESYSTEM_STEP_TPK_PATCH_ICONS_H_
 
-#include <boost/filesystem/path.hpp>
-
 #include <common/step/step.h>
 #include <manifest_parser/utils/logging.h>
 
+#include <filesystem>
+
 namespace tpk {
 namespace filesystem {
 
@@ -29,10 +29,10 @@ class StepTpkPatchIcons : public common_installer::Step {
 
  private:
   Status ProcessIconOutsidePackage(
-      const boost::filesystem::path& common_icon_location,
-      const boost::filesystem::path& icon_text,
+      const std::filesystem::path& common_icon_location,
+      const std::filesystem::path& icon_text,
       application_x* app, icon_x* icon);
-  Status FixIconLocation(const boost::filesystem::path& icon_text);
+  Status FixIconLocation(const std::filesystem::path& icon_text);
 
   STEP_NAME(TpkPatchIcons)
 };
index 673e8ddbe5da8bc54e15afe7f5d250b7fc12d6a9..2e1bc231e0231998ebe343ad21b42897db0ef501 100644 (file)
@@ -4,25 +4,24 @@
 
 #include "tpk/step/filesystem/step_tpk_prepare_package_directory.h"
 
-#include <boost/filesystem/operations.hpp>
-#include <boost/system/error_code.hpp>
-
 #include <common/utils/paths.h>
 #include <common/utils/file_util.h>
 
+#include <filesystem>
+#include <system_error>
+
 #include "tpk/tpk_mount_path.h"
 
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 namespace tpk {
 namespace filesystem {
 
 ci::Step::Status StepTpkPreparePackageDirectory::BackupDirectory(
-    const std::string& entry, const bf::path& backup_path) {
+    const std::string& entry, const fs::path& backup_path) {
   std::string root_entry = entry.substr(0, entry.find("/"));
-  if (!bf::exists(context_->GetPkgPath() / root_entry))
+  if (!fs::exists(context_->GetPkgPath() / root_entry))
     return Status::OK;
 
   if (!ci::MoveDir(context_->GetPkgPath() / root_entry,
@@ -54,16 +53,16 @@ ci::Step::Status StepTpkPreparePackageDirectory::PrepareDirectory(
 }
 
 ci::Step::Status StepTpkPreparePackageDirectory::PrepareLink(
-    const std::string& entry, const bf::path& mount_point) {
-  bs::error_code error;
-  bf::path mount_point_entry = mount_point / entry;
+    const std::string& entry, const fs::path& mount_point) {
+  std::error_code error;
+  fs::path mount_point_entry = mount_point / entry;
 
-  if (!bf::exists(mount_point_entry))
+  if (!fs::exists(mount_point_entry))
     return Status::OK;
 
-  bf::path destination = context_->GetPkgPath() / entry;
-  if (bf::exists(destination)) {
-    if (!bf::is_symlink(symlink_status(destination))) {
+  fs::path destination = context_->GetPkgPath() / entry;
+  if (fs::exists(destination)) {
+    if (!fs::is_symlink(symlink_status(destination))) {
       LOG(ERROR) << "Cannot proceed. "
                   << "Location of link is used by another file";
       return Status::APP_DIR_ERROR;
@@ -72,14 +71,14 @@ ci::Step::Status StepTpkPreparePackageDirectory::PrepareLink(
     if (context_->request_type.get() == ci::RequestType::MountUpdate)
       return Status::OK;
 
-    bf::remove(destination, error);
+    fs::remove(destination, error);
     if (error) {
       LOG(ERROR) << "Failed to remove previous symlink";
       return Status::APP_DIR_ERROR;
     }
   }
 
-  bf::create_symlink(mount_point_entry, destination, error);
+  fs::create_symlink(mount_point_entry, destination, error);
   if (error) {
     LOG(ERROR) << "Failed to create symlink for entry: " << mount_point_entry;
     return Status::APP_DIR_ERROR;
@@ -91,7 +90,7 @@ ci::Step::Status StepTpkPreparePackageDirectory::PrepareLink(
 
 ci::Step::Status StepTpkPreparePackageDirectory::ExtractEntries() {
   LOG(DEBUG) << "Extracting entries from zip package...";
-  bf::path backup_path =
+  fs::path backup_path =
       ci::GetBackupPathForPackagePath(context_->GetPkgPath());
 
   for (auto& entry : tpk::GetExtractEntries()) {
@@ -112,7 +111,7 @@ ci::Step::Status StepTpkPreparePackageDirectory::ExtractEntries() {
 }
 
 ci::Step::Status StepTpkPreparePackageDirectory::PrepareLinks() {
-  bf::path mount_point = ci::GetMountLocation(context_->GetPkgPath());
+  fs::path mount_point = ci::GetMountLocation(context_->GetPkgPath());
   LOG(DEBUG) << "Creating symlinks to zip package...";
   for (auto& link_entry : tpk::GetSymlinkEntries()) {
     LOG(DEBUG) << "Symlink: " << link_entry;
@@ -157,7 +156,7 @@ ci::Step::Status StepTpkPreparePackageDirectory::undo() {
   for (auto& entry : tpk::GetExtractEntries()) {
     std::string root_entry = entry.substr(0, entry.find("/"));
     ci::RemoveAll(context_->GetPkgPath() / root_entry);
-    if (!bf::exists(backupPath_ / root_entry))
+    if (!fs::exists(backupPath_ / root_entry))
       continue;
 
     ci::MoveDir(backupPath_ / root_entry, context_->GetPkgPath() / root_entry,
index ed15094876653a0a9434e280e15625caff199b16..9fcfdae7b1865484737c7cc698ba4d59eba649a9 100644 (file)
@@ -7,13 +7,12 @@
 
 #include <manifest_parser/utils/logging.h>
 
-#include <boost/filesystem/path.hpp>
-
 #include <common/installer_context.h>
 #include <common/step/step.h>
 
 #include <pkgmgrinfo_basic.h>
 
+#include <filesystem>
 #include <string>
 #include <vector>
 
@@ -49,14 +48,14 @@ class StepTpkPreparePackageDirectory : public common_installer::Step {
 
  protected:
   Status BackupDirectory(const std::string& entry,
-                     const boost::filesystem::path& backup_path);
+                     const std::filesystem::path& backup_path);
   Status PrepareDirectory(const std::string& entry);
   Status PrepareLinks();
   Status ExtractEntries();
   Status PrepareLink(const std::string& entry,
-                     const boost::filesystem::path& mount_point);
+                     const std::filesystem::path& mount_point);
  private:
-  boost::filesystem::path backupPath_;
+  std::filesystem::path backupPath_;
 
   STEP_NAME(TpkPreparePackageDirectory)
 };
index c85e719a3b7de923a624c2368b8e35b20ff75c06..c8a4984f0bbb8bb1ddf439e5d3e2c3c973c5ec1d 100644 (file)
@@ -7,21 +7,19 @@
 #include <pkgmgr_parser.h>
 #include <pkgmgr-info.h>
 
-#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <boost/system/error_code.hpp>
 #include <common/utils/glist_range.h>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xpath.h>
 
+#include <filesystem>
 #include <string>
+#include <system_error>
 
 #include "common/utils/file_util.h"
 
-namespace bs = boost::system;
-namespace bf = boost::filesystem;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 namespace {
 
@@ -37,25 +35,25 @@ namespace tpk {
 namespace pkgmgr {
 
 common_installer::Step::Status StepConvertXml::precheck() {
-  bf::path xml_path = context_->GetPkgPath();
+  fs::path xml_path = context_->GetPkgPath();
   xml_path /= "tizen-manifest.xml";
 
-  if (bf::exists(xml_path)) {
+  if (fs::exists(xml_path)) {
     xml_path_ = xml_path;
-  } else if (bf::exists(context_->xml_path.get())) {
+  } else if (fs::exists(context_->xml_path.get())) {
     xml_path_ = context_->xml_path.get();
   } else {
     LOG(ERROR) << "Cannot find manifest file";
     return Step::Status::MANIFEST_NOT_FOUND;
   }
 
-  new_path_ = bf::path(getUserManifestPath(context_->uid.get(),
-      context_->is_readonly_package.get())) / bf::path(context_->pkgid.get());
+  new_path_ = fs::path(getUserManifestPath(context_->uid.get(),
+      context_->is_readonly_package.get())) / fs::path(context_->pkgid.get());
   new_path_ += ".xml";
-  if (bf::exists(new_path_)) {
+  if (fs::exists(new_path_)) {
     backup_path_ = new_path_.string() + ".bck";
-    bs::error_code error;
-    bf::copy_file(new_path_, backup_path_, error);
+    std::error_code error;
+    fs::copy_file(new_path_, backup_path_, error);
     if (error)
       LOG(WARNING) << "Failed to backup original manifest file " << new_path_
                    << " due to error: " << error;
@@ -99,7 +97,7 @@ bool StepConvertXml::ConvertXml(xmlDocPtr doc) {
 }
 
 common_installer::Step::Status StepConvertXml::process() {
-  xmlDocPtr doc = xmlParseFile(xml_path_.string().c_str());
+  xmlDocPtr doc = xmlParseFile(xml_path_.c_str());
   auto doc_ptr = std::unique_ptr<std::remove_pointer<xmlDocPtr>::type,
       decltype(xmlFreeDoc)*>(doc, xmlFreeDoc);
   if (!doc) {
@@ -110,12 +108,12 @@ common_installer::Step::Status StepConvertXml::process() {
   if (!ConvertXml(doc))
     return Step::Status::MANIFEST_ERROR;
 
-  if (!bf::exists(new_path_.parent_path())) {
-    bs::error_code error;
-    bf::create_directories(new_path_.parent_path(), error);
+  if (!fs::exists(new_path_.parent_path())) {
+    std::error_code error;
+    fs::create_directories(new_path_.parent_path(), error);
   }
 
-  if (xmlSaveFile(new_path_.string().c_str(), doc) == -1) {
+  if (xmlSaveFile(new_path_.c_str(), doc) == -1) {
     LOG(ERROR) << "Failed to write xml file";
     return Step::Status::MANIFEST_ERROR;
   }
@@ -148,8 +146,8 @@ common_installer::Step::Status StepConvertXml::undo() {
   if (backup_path_.empty())
     return Step::Status::OK;
 
-  bs::error_code error;
-  bf::rename(backup_path_, new_path_, error);
+  std::error_code error;
+  fs::rename(backup_path_, new_path_, error);
   if (error)
     LOG(WARNING) << "Failed to restore " << new_path_
                   << " due to error " << error;
index ae4393265378a5da03b46f801077e9666aa40ed1..40ad9fd08a5a8c17cef0ab20cdcb943b1d49c4c8 100644 (file)
@@ -5,12 +5,11 @@
 #ifndef TPK_STEP_PKGMGR_STEP_CONVERT_XML_H_
 #define TPK_STEP_PKGMGR_STEP_CONVERT_XML_H_
 
-#include <manifest_parser/utils/logging.h>
-
-#include <boost/filesystem/path.hpp>
+#include <common/step/step.h>
 #include <libxml/tree.h>
+#include <manifest_parser/utils/logging.h>
 
-#include <common/step/step.h>
+#include <filesystem>
 
 namespace tpk {
 namespace pkgmgr {
@@ -25,9 +24,9 @@ class StepConvertXml : public common_installer::Step {
   Status precheck() override;
 
  private:
-  boost::filesystem::path xml_path_;
-  boost::filesystem::path new_path_;
-  boost::filesystem::path backup_path_;
+  std::filesystem::path xml_path_;
+  std::filesystem::path new_path_;
+  std::filesystem::path backup_path_;
   bool ConvertXml(xmlDocPtr doc);
 
   STEP_NAME(ConvertXml)
index 64c5912c3fa16dac3f96d1e3a3e5398df44a537d..4852a7f3e5639688dd409ff91e5b6746166ba787 100644 (file)
@@ -8,20 +8,19 @@
 #include <common/utils/glist_range.h>
 #include <manifest_parser/utils/version_number.h>
 
-#include <boost/filesystem/path.hpp>
-#include <boost/filesystem/operations.hpp>
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 #include <libxml/xpath.h>
 #include <libxml/xpathInternals.h>
+
+#include <filesystem>
 #include <string>
 #include <memory>
 
 #include "common/utils/profile_util.h"
 #include "common/installer_context.h"
 
-namespace bs = boost::system;
-namespace bf = boost::filesystem;
+namespace fs = std::filesystem;
 
 using libxml_char = const unsigned char *;
 
@@ -62,9 +61,9 @@ namespace tpk {
 namespace pkgmgr {
 
 common_installer::Step::Status StepManifestAdjustment::precheck() {
-  bf::path xml_path = context_->xml_path.get();
+  fs::path xml_path = context_->xml_path.get();
 
-  if (!bf::exists(xml_path)) {
+  if (!fs::exists(xml_path)) {
     LOG(ERROR) << "Cannot find manifest file at " << xml_path;
     return Step::Status::ERROR;
   }
index be79afec92fa07c679f8292ea8acb5aad92273ef..9b34145a17c6c16a3b9bbc3e385a3eba31ad7fdc 100644 (file)
@@ -5,11 +5,10 @@
 #ifndef TPK_STEP_PKGMGR_STEP_MANIFEST_ADJUSTMENT_H_
 #define TPK_STEP_PKGMGR_STEP_MANIFEST_ADJUSTMENT_H_
 
+#include <common/step/step.h>
 #include <manifest_parser/utils/logging.h>
 
-#include <boost/filesystem/path.hpp>
-
-#include <common/step/step.h>
+#include <filesystem>
 
 namespace tpk {
 namespace pkgmgr {
@@ -24,7 +23,7 @@ class StepManifestAdjustment : public common_installer::Step {
   Status precheck() override;
 
  private:
-  boost::filesystem::path xml_path_;
+  std::filesystem::path xml_path_;
 
   bool IsNonPrivilegedPackage();
   bool IsAdjustmentNecessary();
index b14754f4781f68171c3e770ec0e47541ebbbd7e0..ea61445b60b7c7245a5220c5b65ff6956bb5ab85 100644 (file)
@@ -2,14 +2,16 @@
 // Use of this source code is governed by an apache 2.0 license that can be
 // found in the LICENSE file.
 
+#include <filesystem>
+
 #include "tpk/step/security/step_tpk_recover_signature.h"
 
-namespace bf = boost::filesystem;
+namespace fs = std::filesystem;
 
 namespace tpk {
 namespace security {
 
-bf::path StepTpkRecoverSignature::GetSignatureRoot() {
+fs::path StepTpkRecoverSignature::GetSignatureRoot() {
   return context_->GetPkgPath();
 }
 
index 81be14ef54f0d59c6f19e06b6f0f3858ff602257..325c3f5a1d9a8a5d8ad95af75351ccb6d5cd13c3 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <common/step/security/step_recover_signature.h>
 
-#include <boost/filesystem/path.hpp>
+#include <filesystem>
 
 namespace tpk {
 namespace security {
@@ -18,7 +18,7 @@ class StepTpkRecoverSignature
   using StepRecoverSignature::StepRecoverSignature;
 
  private:
-  boost::filesystem::path GetSignatureRoot() override;
+  std::filesystem::path GetSignatureRoot() override;
 
   STEP_NAME(TpkRecoverSignature)
 };
index 28dca0c27f03b4ce2f98fecca89d0d737b65ca83..9f0b3d09cf78e9c85ef396cd191c11fb853496cc 100644 (file)
@@ -7,10 +7,6 @@
 #include <unistd.h>
 #include <sys/types.h>
 
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
-#include <boost/system/error_code.hpp>
-
 #include <common/utils/pkgmgr_query.h>
 #include <common/utils/file_util.h>
 #include <common/utils/request.h>
 #include <tpk_manifest_handlers/package_handler.h>
 #include <tpk_manifest_handlers/tpk_config_parser.h>
 
+#include <filesystem>
 #include <memory>
 #include <string>
+#include <system_error>
 
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 namespace {
 
@@ -41,12 +38,12 @@ std::string TpkAppQueryInterface::GetManifestFileName() const {
 
 std::string TpkAppQueryInterface::GetPkgIdFromPath(
     const std::string& path) const {
-  bf::path tmp_path = ExtractManifest(path);
+  fs::path tmp_path = ExtractManifest(path);
   if (tmp_path.empty())
     return {};
 
-  bf::path manifest_path = tmp_path / kManifestFileName;
-  if (!bf::exists(manifest_path)) {
+  fs::path manifest_path = tmp_path / kManifestFileName;
+  if (!fs::exists(manifest_path)) {
     ClearTemporaryFile(tmp_path);
     return {};
   }
index 293df933b47be21f03d1e96db8ec6339a3c9226c..33ea99467a43ecbece61561bd69734e7ede4f16b 100644 (file)
@@ -43,21 +43,17 @@ INSTALL(DIRECTORY test_samples/ DESTINATION ${SHAREDIR}/${DESTINATION_DIR}/test_
 ENDIF()
 
 APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST} PUBLIC
-  Boost
   GMOCK_DEPS
   GUM_DEPS
 )
 APPLY_PKG_CONFIG(${TARGET_SMOKE_TEST_EXTENSIVE} PUBLIC
-  Boost
   GMOCK_DEPS
   GUM_DEPS
 )
 APPLY_PKG_CONFIG(${TARGET_MANIFEST_TEST} PUBLIC
-  Boost
   GMOCK_DEPS
 )
 APPLY_PKG_CONFIG(${TARGET_RECOVERY_TEST} PUBLIC
-  Boost
   GMOCK_DEPS
   GUM_DEPS
 )
index dbee0fd96b8f0e8d779f3a310e6cf509b649184e..182681488654ce8b92459b18a690bea64af17c1f 100644 (file)
@@ -2,17 +2,15 @@
 // Use of this source code is governed by an apache-2.0 license that can be
 // found in the LICENSE file.
 
-#include <boost/exception/diagnostic_information.hpp>
-#include <boost/program_options.hpp>
-
 #include <smoke_tests/common/smoke_utils.h>
 
+#include <getopt.h>
 #include <gtest/gtest.h>
 #include <gtest/gtest-death-test.h>
+#include <unistd.h>
 
 #include "smoke_tests/tpk_smoke_utils.h"
 
-namespace bpo = boost::program_options;
 namespace ci = common_installer;
 
 enum class BackupType : int {
@@ -69,7 +67,7 @@ class SmokeEnvironment : public testing::Environment {
 
  private:
   ci::RequestMode request_mode_;
-  std::vector<bf::path> backups_;
+  std::vector<fs::path> backups_;
   bool no_backup_;
   BackupType backup_type_;
 };
@@ -113,8 +111,8 @@ class PreloadSmokeTest : public testing::Test {
 };
 
 TEST_F(SmokeTest, DeltaMode_Tpk_Rollback) {
-  bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk_Rollback.tpk";
-  bf::path delta_package = kSmokePackagesDirectory /
+  fs::path path = kSmokePackagesDirectory / "DeltaMode_Tpk_Rollback.tpk";
+  fs::path delta_package = kSmokePackagesDirectory /
       "DeltaMode_Tpk_Rollback.delta";
   std::string pkgid = "smoketpk28";
   std::string appid = "smoketpk28.DeltaModeTpk_Rollback";
@@ -133,12 +131,12 @@ TEST_F(SmokeTest, DeltaMode_Tpk_Rollback) {
 
     // Check delta modifications
 
-    bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+    fs::path root_path = ci::GetRootAppPath(params.is_readonly,
         params.test_user.uid);
-    EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "DELETED"));
-    EXTENDED_ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "ADDED"));
-    EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "basicdali"));
-    EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" /
+    EXTENDED_ASSERT_TRUE(fs::exists(root_path / pkgid / "res" / "DELETED"));
+    EXTENDED_ASSERT_FALSE(fs::exists(root_path / pkgid / "res" / "ADDED"));
+    EXTENDED_ASSERT_TRUE(fs::exists(root_path / pkgid / "bin" / "basicdali"));
+    EXTENDED_ASSERT_TRUE(fs::exists(root_path / pkgid / "shared" / "res" /
                            "basicdali.png"));
     EXTENDED_ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
         "res/MODIFIED", "version 1\n", params));
@@ -150,7 +148,7 @@ TEST_F(SmokeTest, DeltaMode_Tpk_Rollback) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
-  bf::path path = kSmokePackagesDirectory / "RecoveryMode_Tpk_Installation.tpk";
+  fs::path path = kSmokePackagesDirectory / "RecoveryMode_Tpk_Installation.tpk";
   std::string pkgid = "smokeapp15";
   std::string appid = "smokeapp15.RecoveryModeTpkInstallation";
   std::string exec = "native";
@@ -167,7 +165,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
       {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
   backend.CrashAfterEachStep(&args, [&](int step) -> bool {
     if (step >= 2) {
-      bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+      fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
       EXTENDED_ASSERT_FALSE(recovery_file.empty());
       std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -191,8 +189,8 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
-  bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update_2.tpk";
+  fs::path path_old = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update_2.tpk";
   std::string pkgid = "smokeapp16";
   std::string appid = "smokeapp16.RecoveryModeTpkUpdate";
   std::string exec = "native";
@@ -215,7 +213,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
       {"", "-i", path_new.string(), "-u", test_uid_str.c_str()};
   backend.CrashAfterEachStep(&args, [&](int step) -> bool {
     if (step >= 2) {
-      bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+      fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
           params.test_user.uid);
       EXTENDED_ASSERT_FALSE(recovery_file.empty());
       std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -246,11 +244,11 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
 }
 
 #define TEP_TEST_STARTING_BLOCK(NUMBER)                                        \
-  bf::path path = kSmokePackagesDirectory / "TEP_Tpk";                         \
+  fs::path path = kSmokePackagesDirectory / "TEP_Tpk";                         \
   path += #NUMBER;                                                             \
   path += ".tpk";                                                              \
-  bf::path tep1 = kSmokePackagesDirectory / "tep1.tep";                        \
-  bf::path tep2 = kSmokePackagesDirectory / "tep2.tep";                        \
+  fs::path tep1 = kSmokePackagesDirectory / "tep1.tep";                        \
+  fs::path tep2 = kSmokePackagesDirectory / "tep2.tep";                        \
   std::string number = std::to_string(50 + NUMBER - 1);                        \
   std::string pkgid = std::string("smokeapp") + number;                        \
   std::string appid = pkgid + ".TEP";                                          \
@@ -291,10 +289,10 @@ TEST_F(SmokeTest, TEP_Tpk_NoTepInstallTepUpdateRollback) {
     EXTENDED_ASSERT_TRUE(new_file_status.Init());
     EXTENDED_ASSERT_TRUE(expected_file_status.IsEqual(new_file_status));
     EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-    bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+    fs::path root_path = ci::GetRootAppPath(params.is_readonly,
         params.test_user.uid);
-    bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
-    EXTENDED_ASSERT_FALSE(bf::exists(tep_file));
+    fs::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
+    EXTENDED_ASSERT_FALSE(fs::exists(tep_file));
     return true;
   });
 }
@@ -354,10 +352,10 @@ TEST_F(SmokeTest, TEP_Tpk_Mount_NoTepInstallTepUpdateRollback) {
     EXTENDED_ASSERT_TRUE(expected_file_status.IsEqual(new_file_status));
     ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
     EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-    bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+    fs::path root_path = ci::GetRootAppPath(params.is_readonly,
         params.test_user.uid);
-    bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
-    EXTENDED_ASSERT_FALSE(bf::exists(tep_file));
+    fs::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
+    EXTENDED_ASSERT_FALSE(fs::exists(tep_file));
     return true;
   });
 }
@@ -383,7 +381,7 @@ TEST_F(SmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdateRollback) {
 }
 
 TEST_F(SmokeTest, InstallationMode_Rollback) {
-  bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.tpk";
+  fs::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.tpk";
   std::string pkgid = "smoketpk34";
   std::string test_uid_str = std::to_string(params.test_user.uid);
   const char* argv[] = {"", "-i", path.c_str(), "-u", test_uid_str.c_str()};
@@ -395,8 +393,8 @@ TEST_F(SmokeTest, InstallationMode_Rollback) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_ForDelta) {
-  bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
+  fs::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
   std::string pkgid = "smoketpk35";
   std::string appid = "smoketpk35.RecoveryMode_ForDelta";
   std::string exec = "smoketpk35";
@@ -419,7 +417,7 @@ TEST_F(SmokeTest, RecoveryMode_ForDelta) {
     {"", "-i", path_new.string(), "-u", test_uid_str.c_str()};
   backend.CrashAfterEachStep(&args, [&](int step) -> bool {
     if (step >= 2) {
-      bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+      fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
           params.test_user.uid);
       EXTENDED_ASSERT_FALSE(recovery_file.empty());
       std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -432,23 +430,23 @@ TEST_F(SmokeTest, RecoveryMode_ForDelta) {
       EXTENDED_ASSERT_TRUE(
           ValidateFileContentInPackage(pkgid, "res/MODIFIED", contents,
               params));
-      bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+      fs::path root_path = ci::GetRootAppPath(params.is_readonly,
           params.test_user.uid);
       FileInfoCollector new_file_status(pkgid, params);
       EXTENDED_ASSERT_TRUE(new_file_status.Init());
 
       if (recovery_info->cleanup()) {
         EXTENDED_ASSERT_TRUE(expected_file_status_new.IsEqual(new_file_status));
-        EXTENDED_ASSERT_FALSE(bf::exists(root_path / pkgid / "res/DELETED"));
-        EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "res/ADDED"));
+        EXTENDED_ASSERT_FALSE(fs::exists(root_path / pkgid / "res/DELETED"));
+        EXTENDED_ASSERT_TRUE(fs::exists(root_path / pkgid / "res/ADDED"));
         EXTENDED_ASSERT_EQ(backend.UninstallWithSubprocess(pkgid),
             BackendInterface::SubProcessResult::SUCCESS);
         EXTENDED_ASSERT_EQ(backend.InstallWithSubprocess(path_old),
             BackendInterface::SubProcessResult::SUCCESS);
       } else {
         EXTENDED_ASSERT_TRUE(expected_file_status_old.IsEqual(new_file_status));
-        EXTENDED_ASSERT_TRUE(bf::exists(root_path / pkgid / "res/DELETED"));
-        EXTENDED_ASSERT_FALSE(bf::exists(root_path / pkgid / "res/ADDED"));
+        EXTENDED_ASSERT_TRUE(fs::exists(root_path / pkgid / "res/DELETED"));
+        EXTENDED_ASSERT_FALSE(fs::exists(root_path / pkgid / "res/ADDED"));
       }
     }
     return true;
@@ -456,8 +454,8 @@ TEST_F(SmokeTest, RecoveryMode_ForDelta) {
 }
 
 TEST_F(SmokeTest, UpdateMode_Rollback) {
-  bf::path old_path = kSmokePackagesDirectory / "UpdateMode_Rollback.tpk";
-  bf::path new_path = kSmokePackagesDirectory / "UpdateMode_Rollback2.tpk";
+  fs::path old_path = kSmokePackagesDirectory / "UpdateMode_Rollback.tpk";
+  fs::path new_path = kSmokePackagesDirectory / "UpdateMode_Rollback2.tpk";
   std::string pkgid = "smoketpk36";
   std::string appid = "smoketpk36.UpdateMode_Rollback";
   std::string exec = "smoketpk36";
@@ -481,7 +479,7 @@ TEST_F(SmokeTest, UpdateMode_Rollback) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
-  bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.tpk";
+  fs::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.tpk";
   std::string pkgid = "smoketpk37";
   std::string appid = "smoketpk37.RecoveryMode_ForMountInstall";
   std::string exec = "smoketpk37";
@@ -492,7 +490,7 @@ TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
       {"", "-w", path.string(), "-u", test_uid_str.c_str()};
   backend.CrashAfterEachStep(&args, [&](int step) -> bool {
     if (step >= 2) {
-      bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+      fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
       EXTENDED_ASSERT_FALSE(recovery_file.empty());
       std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -513,9 +511,9 @@ TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
-  bf::path path_old =
+  fs::path path_old =
       kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.tpk";
-  bf::path path_new =
+  fs::path path_new =
       kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate2.tpk";
   std::string pkgid = "smoketpk38";
   std::string appid = "smoketpk38.RecoveryMode_ForMountUpdate";
@@ -544,7 +542,7 @@ TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
           params.test_user.uid);
       poweroff_unmount_interface.Release();
 
-      bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+      fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
       EXTENDED_ASSERT_FALSE(recovery_file.empty());
       std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -577,7 +575,7 @@ TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
 }
 
 TEST_F(SmokeTest, MountInstallationMode_Rollback) {
-  bf::path path =
+  fs::path path =
       kSmokePackagesDirectory / "MountInstallationMode_Rollback.tpk";
   std::string pkgid = "smoketpk39";
   std::string test_uid_str = std::to_string(params.test_user.uid);
@@ -591,8 +589,8 @@ TEST_F(SmokeTest, MountInstallationMode_Rollback) {
 }
 
 TEST_F(SmokeTest, MountUpdateMode_Rollback) {
-  bf::path old_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback.tpk";
-  bf::path new_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback2.tpk";
+  fs::path old_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback.tpk";
+  fs::path new_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback2.tpk";
   std::string pkgid = "smoketpk40";
   std::string appid = "smoketpk40.MountUpdateMode_Rollback";
   std::string exec = "smoketpk40";
@@ -617,9 +615,9 @@ TEST_F(SmokeTest, MountUpdateMode_Rollback) {
 }
 
 TEST_F(PreloadSmokeTest, RecoveryMode_ForReadonlyUpdateInstall) {
-  bf::path path_old = kSmokePackagesDirectory /
+  fs::path path_old = kSmokePackagesDirectory /
       "RecoveryMode_ForReadonlyUpdateInstall.tpk";
-  bf::path path_new = kSmokePackagesDirectory /
+  fs::path path_new = kSmokePackagesDirectory /
       "RecoveryMode_ForReadonlyUpdateInstall_2.tpk";
   std::string pkgid = "smoketpk46";
   std::string appid = "smoketpk46.RecoveryMode_ForReadonlyUpdateInstall";
@@ -643,7 +641,7 @@ TEST_F(PreloadSmokeTest, RecoveryMode_ForReadonlyUpdateInstall) {
       {"", "-i", path_new.string(), "-u", test_uid_str.c_str()};
   backend.CrashAfterEachStep(&args, [&](int step) -> bool {
     if (step >= 2) {
-      bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+      fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
           params.test_user.uid);
       EXTENDED_ASSERT_FALSE(recovery_file.empty());
       std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -672,14 +670,14 @@ TEST_F(PreloadSmokeTest, RecoveryMode_ForReadonlyUpdateInstall) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_AddResControl) {
-  bf::path path_old = kSmokePackagesDirectory
+  fs::path path_old = kSmokePackagesDirectory
       / "RecoveryMode_AddResControl.tpk";
-  bf::path path_new = kSmokePackagesDirectory
+  fs::path path_new = kSmokePackagesDirectory
       / "RecoveryMode_AddResControl_2.tpk";
   std::string pkgid = "smoketpk50";
   std::string appid = "smoketpk50.RecoveryMode_AddResControl";
   std::string exec = "native";
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ASSERT_EQ(backend.InstallWithSubprocess(path_old),
@@ -700,7 +698,7 @@ TEST_F(SmokeTest, RecoveryMode_AddResControl) {
       {"", "-i", path_new.string(), "-u", test_uid_str.c_str()};
   backend.CrashAfterEachStep(&args, [&](int step) -> bool {
     if (step >= 2) {
-      bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+      fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
           params.test_user.uid);
       EXTENDED_ASSERT_FALSE(recovery_file.empty());
       std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -709,9 +707,9 @@ TEST_F(SmokeTest, RecoveryMode_AddResControl) {
           BackendInterface::SubProcessResult::SUCCESS);
       EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
       bool dir_exists = recovery_info->cleanup();
-      EXTENDED_ASSERT_EQ(bf::exists(root_path / pkgid / "res/mount/allowed"),
+      EXTENDED_ASSERT_EQ(fs::exists(root_path / pkgid / "res/mount/allowed"),
           dir_exists);
-      EXTENDED_ASSERT_EQ(bf::exists(root_path / pkgid / "res/mount/global"),
+      EXTENDED_ASSERT_EQ(fs::exists(root_path / pkgid / "res/mount/global"),
           dir_exists);
       FileInfoCollector new_file_status(pkgid, params);
       EXTENDED_ASSERT_TRUE(new_file_status.Init());
@@ -731,14 +729,14 @@ TEST_F(SmokeTest, RecoveryMode_AddResControl) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_RemoveResControl) {
-  bf::path path_old = kSmokePackagesDirectory
+  fs::path path_old = kSmokePackagesDirectory
       / "RecoveryMode_RemoveResControl.tpk";
-  bf::path path_new = kSmokePackagesDirectory
+  fs::path path_new = kSmokePackagesDirectory
       / "RecoveryMode_RemoveResControl_2.tpk";
   std::string pkgid = "smoketpk51";
   std::string appid = "smoketpk51.RecoveryMode_RemoveResControl";
   std::string exec = "native";
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ASSERT_EQ(backend.InstallWithSubprocess(path_old),
@@ -759,7 +757,7 @@ TEST_F(SmokeTest, RecoveryMode_RemoveResControl) {
       {"", "-i", path_new.string(), "-u", test_uid_str.c_str()};
   backend.CrashAfterEachStep(&args, [&](int step) -> bool {
     if (step >= 2) {
-      bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+      fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
           params.test_user.uid);
       EXTENDED_ASSERT_FALSE(recovery_file.empty());
       std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -768,9 +766,9 @@ TEST_F(SmokeTest, RecoveryMode_RemoveResControl) {
           BackendInterface::SubProcessResult::SUCCESS);
       EXTENDED_ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
       bool dir_exists = !recovery_info->cleanup();
-      EXTENDED_ASSERT_EQ(bf::exists(root_path / pkgid / "res/mount/allowed"),
+      EXTENDED_ASSERT_EQ(fs::exists(root_path / pkgid / "res/mount/allowed"),
           dir_exists);
-      EXTENDED_ASSERT_EQ(bf::exists(root_path / pkgid / "res/mount/global"),
+      EXTENDED_ASSERT_EQ(fs::exists(root_path / pkgid / "res/mount/global"),
           dir_exists);
       FileInfoCollector new_file_status(pkgid, params);
       EXTENDED_ASSERT_TRUE(new_file_status.Init());
@@ -791,6 +789,17 @@ TEST_F(SmokeTest, RecoveryMode_RemoveResControl) {
 
 }  // namespace smoke_test
 
+const char kHelpMessage[] = R"(Allowed options:
+  --help                display this help message
+  --no-backup           Do test without backup
+  --backup-type arg     <move|copy> set test's backup type 'move', 'copy and
+                        remove'
+)";
+
+void PrintHelp() {
+  std::cerr << kHelpMessage;
+}
+
 int main(int argc,  char** argv) {
   try {
     bool no_backup = false;
@@ -803,38 +812,40 @@ int main(int argc,  char** argv) {
     }
     testing::InitGoogleTest(&argc, argv);
 
-    bpo::options_description options("Allowed options");
-    bpo::variables_map opt_map;
-    try {
-      options.add_options()
-          ("help", "display this help message")
-          ("no-backup",  "Do test without backup")
-          ("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
-              "backup type \'move\', \'copy and remove\'");
-      bpo::store(bpo::parse_command_line(argc, argv, options), opt_map);
-      if (opt_map.count("help")) {
-        std::cerr << options << std::endl;
-        return -1;
-      }
-
-      if (opt_map.count("no-backup"))
-        no_backup = true;
-      if (opt_map.count("backup-type")) {
-        if (opt_map["backup-type"].as<std::string>() == "move") {
-          backup_type = BackupType::MOVE;
-        } else if (opt_map["backup-type"].as<std::string>() == "copy") {
-          backup_type = BackupType::COPY_AND_REMOVE;
-        } else {
-          std::cerr << options << std::endl;
+    const struct option long_opts[] = {
+      { "help", no_argument, nullptr, 'h' },
+      { "no-backup", no_argument, nullptr, 'n' },
+      { "backup-type", required_argument, nullptr, 'b' },
+      { 0, 0, 0, 0 },
+    };
+
+    while (true) {
+      int opt = getopt_long(argc, argv, "", long_opts, nullptr);
+      if (opt == -1)
+        break;
+
+      switch (opt) {
+        case 'h':
+          PrintHelp();
           return -1;
-        }
+        case 'n':
+          no_backup = true;
+          break;
+        case 'b':
+          if (optarg) {
+            if (strcmp(optarg, "move") == 0) {
+              backup_type = BackupType::MOVE;
+            } else if (strcmp(optarg, "copy") == 0) {
+              backup_type = BackupType::COPY_AND_REMOVE;
+            } else {
+              PrintHelp();
+              return -1;
+            }
+          }
+          break;
+        default:
+          break;
       }
-      bpo::notify(opt_map);
-    } catch (...) {
-      std::cerr << "Exception occurred: "
-                << boost::current_exception_diagnostic_information()
-                << std::endl;
-      return -1;
     }
 
     ::env = static_cast<smoke_test::SmokeEnvironment*>(
index b1a9aef79906123d159870b4e98ab8fc01f5403f..92f45a86751f2093ce56f898320873c86c08e8e4 100644 (file)
@@ -5,9 +5,10 @@
 #include "smoke_tests/manifest_test.h"
 
 #include <cassert>
+#include <filesystem>
 
-namespace bf = boost::filesystem;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 namespace {
 
@@ -28,7 +29,7 @@ manifest_x* StepParseRunner::GetManifest() const {
   return context_->manifest_data.get();
 }
 
-bf::path StepParseRunner::GetRootApplicationPath() const {
+fs::path StepParseRunner::GetRootApplicationPath() const {
   return context_->root_application_path.get();
 }
 
@@ -36,10 +37,10 @@ void StepParseRunner::PrepareContext() {
   context_.reset(new ci::InstallerContext());
   context_->root_application_path.set(ci::GetRootAppPath(false, getuid()));
   context_->unpacked_dir_path.set(
-      bf::path(kManifestTestcaseData) / dir_suffix_);
+      fs::path(kManifestTestcaseData) / dir_suffix_);
 
   // Make sure that there is manifest file for testcase
-  assert(bf::exists(context_->unpacked_dir_path.get() / "tizen-manifest.xml")
+  assert(fs::exists(context_->unpacked_dir_path.get() / "tizen-manifest.xml")
          && "Failed to stat manifest file");
 }
 
index 821bc27e63188f26f724bf555921f1c55ade326c..59aeb9946ca46a25ea2ca4f88b01f5e2147c53a5 100644 (file)
@@ -5,8 +5,6 @@
 #ifndef TEST_SMOKE_TESTS_MANIFEST_TEST_H_
 #define TEST_SMOKE_TESTS_MANIFEST_TEST_H_
 
-#include <boost/filesystem/path.hpp>
-
 #include <common/installer_context.h>
 #include <common/step/configuration/step_parse_manifest.h>
 #include <common/utils/glist_range.h>
@@ -15,6 +13,7 @@
 #include <glib.h>
 #include <gtest/gtest.h>
 
+#include <filesystem>
 #include <memory>
 #include <string>
 
@@ -43,7 +42,7 @@ class StepParseRunner {
 
   bool Run();
   manifest_x* GetManifest() const;
-  boost::filesystem::path GetRootApplicationPath() const;
+  std::filesystem::path GetRootApplicationPath() const;
 
  private:
   void PrepareContext();
index 3483ddd2d93b437aaf9383b1c9b0ccae22f188a6..38b53bd6744b6babdd08eba683ace7d9201e8a01 100644 (file)
@@ -2,10 +2,12 @@
 // Use of this source code is governed by an apache-2.0 license that can be
 // found in the LICENSE file.
 
+#include <filesystem>
+
 #include "smoke_tests/manifest_test.h"
 
-namespace bf = boost::filesystem;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 TEST_F(ManifestTest, ManifestElement_Valid) {
   StepParseRunner runner(GetMyName());
@@ -292,7 +294,7 @@ TEST_F(ManifestTest, AppDefinedPrivilegesElement_WithLicenseValid) {
   ASSERT_EQ(Size(&privileges), 1);
   ASSERT_CSTR_EQ((*privileges.begin())->value,
                  "http://package0id/appdefined/test.read");
-  bf::path path(m->root_path);
+  fs::path path(m->root_path);
   path /= "res/cert";
   ASSERT_CSTR_EQ((*privileges.begin())->license, path.c_str());
 }
@@ -321,7 +323,7 @@ TEST_F(ManifestTest, AppDefinedPrivilegesElement_WithLicenseMany) {
   ASSERT_EQ(Size(&privileges), 2);
   ASSERT_CSTR_EQ(((*privileges.begin()))->value,
                  "http://package0id/appdefined/test.read");
-  bf::path path(m->root_path);
+  fs::path path(m->root_path);
   path /= "res/cert";
   ASSERT_CSTR_EQ(((*privileges.begin()))->license, path.c_str());
   ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
@@ -386,7 +388,7 @@ TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_WithLicenseValid) {
   ASSERT_EQ(Size(&privileges), 1);
   ASSERT_CSTR_EQ((*privileges.begin())->value,
                  "http://package0id/appdefined/test.read");
-  bf::path path(m->root_path);
+  fs::path path(m->root_path);
   path /= "res/cert";
   ASSERT_CSTR_EQ((*privileges.begin())->license, path.c_str());
 }
@@ -415,7 +417,7 @@ TEST_F(ManifestTest, ProvidesAppDefinedPrivilegesElement_WithLicenseMany) {
   ASSERT_EQ(Size(&privileges), 2);
   ASSERT_CSTR_EQ(((*privileges.begin()))->value,
                  "http://package0id/appdefined/test.read");
-  bf::path path(m->root_path);
+  fs::path path(m->root_path);
   path /= "res/cert";
   ASSERT_CSTR_EQ(((*privileges.begin()))->license, path.c_str());
   ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
index 2c65ae03fc6020f36b79752726e18aa25b68af85..b872e4763bd01e1fa45e8c1d6d2a25ad664fcc8d 100644 (file)
@@ -4,13 +4,12 @@
 
 #include "smoke_tests/manifest_test.h"
 
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
-
+#include <filesystem>
+#include <tuple>
 #include <vector>
 
-namespace bf = boost::filesystem;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 TEST_F(ManifestTest, ServiceApplicationElement_Valid) {
   StepParseRunner runner(GetMyName());
@@ -433,7 +432,7 @@ TEST_F(ManifestTest, ServiceApplicationElement_AppControl_CartesianProduct) {
   auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
   ASSERT_EQ(Size(&appcontrols), 8);
 
-  std::vector<boost::tuple<std::string, std::string, std::string>>
+  std::vector<std::tuple<std::string, std::string, std::string>>
       found_app_controls;
   for (auto& item : appcontrols) {
     found_app_controls.emplace_back(item->operation, item->uri, item->mime);
@@ -443,7 +442,7 @@ TEST_F(ManifestTest, ServiceApplicationElement_AppControl_CartesianProduct) {
                          "http://tizen.org/appcontrol/operation/compose2"}) {
     for (auto uri : {"scheme1://", "scheme2://"}) {
       for (auto mime : {"application/text", "application/pdf"}) {
-        ASSERT_IN(boost::make_tuple(operation, uri, mime), found_app_controls);
+        ASSERT_IN(std::make_tuple(operation, uri, mime), found_app_controls);
       }
     }
   }
@@ -458,7 +457,7 @@ TEST_F(ManifestTest,
   auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
   ASSERT_EQ(Size(&appcontrols), 4);
 
-  std::vector<boost::tuple<std::string, std::string, std::string>>
+  std::vector<std::tuple<std::string, std::string, std::string>>
       found_app_controls;
   for (auto& item : appcontrols) {
     ASSERT_EQ(item->mime, nullptr);
@@ -468,7 +467,7 @@ TEST_F(ManifestTest,
   for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
                          "http://tizen.org/appcontrol/operation/compose2"}) {
     for (auto uri : {"scheme1://", "scheme2://"}) {
-      ASSERT_IN(boost::make_tuple(operation, uri, ""), found_app_controls);
+      ASSERT_IN(std::make_tuple(operation, uri, ""), found_app_controls);
     }
   }
 }
@@ -482,7 +481,7 @@ TEST_F(ManifestTest,
   auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
   ASSERT_EQ(Size(&appcontrols), 4);
 
-  std::vector<boost::tuple<std::string, std::string, std::string>>
+  std::vector<std::tuple<std::string, std::string, std::string>>
       found_app_controls;
   for (auto& item : appcontrols) {
     ASSERT_EQ(item->uri, nullptr);
@@ -492,7 +491,7 @@ TEST_F(ManifestTest,
   for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
                          "http://tizen.org/appcontrol/operation/compose2"}) {
     for (auto mime : {"application/text", "application/pdf"}) {
-      ASSERT_IN(boost::make_tuple(operation, "", mime), found_app_controls);
+      ASSERT_IN(std::make_tuple(operation, "", mime), found_app_controls);
     }
   }
 }
@@ -518,7 +517,7 @@ TEST_F(ManifestTest, ServiceApplicationElement_Icon_Valid) {
   ASSERT_NE(app, nullptr);
   auto icons = GListRange<icon_x*>(app->icon);
   ASSERT_EQ(Size(&icons), 1);
-  ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
+  ASSERT_EQ(fs::path((*icons.begin())->text).filename().string(),
             "test_icon.png");
 }
 
index 7689880584902e96132f1c4e72144b074e61d852..01ba8c7dc146be36449bbfb725d2da73d39c4af6 100644 (file)
@@ -4,13 +4,12 @@
 
 #include "smoke_tests/manifest_test.h"
 
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
-
+#include <filesystem>
+#include <tuple>
 #include <vector>
 
-namespace bf = boost::filesystem;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 TEST_F(ManifestTest, UIApplicationElement_Valid) {
   StepParseRunner runner(GetMyName());
@@ -485,7 +484,7 @@ TEST_F(ManifestTest, UIApplicationElement_AppControl_CartesianProduct) {
   auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
   ASSERT_EQ(Size(&appcontrols), 8);
 
-  std::vector<boost::tuple<std::string, std::string, std::string>>
+  std::vector<std::tuple<std::string, std::string, std::string>>
       found_app_controls;
   for (auto& item : appcontrols) {
     found_app_controls.emplace_back(item->operation, item->uri, item->mime);
@@ -495,7 +494,7 @@ TEST_F(ManifestTest, UIApplicationElement_AppControl_CartesianProduct) {
                          "http://tizen.org/appcontrol/operation/compose2"}) {
     for (auto uri : {"scheme1://", "scheme2://"}) {
       for (auto mime : {"application/text", "application/pdf"}) {
-        ASSERT_IN(boost::make_tuple(operation, uri, mime), found_app_controls);
+        ASSERT_IN(std::make_tuple(operation, uri, mime), found_app_controls);
       }
     }
   }
@@ -510,7 +509,7 @@ TEST_F(ManifestTest,
   auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
   ASSERT_EQ(Size(&appcontrols), 4);
 
-  std::vector<boost::tuple<std::string, std::string, std::string>>
+  std::vector<std::tuple<std::string, std::string, std::string>>
       found_app_controls;
   for (auto& item : appcontrols) {
     ASSERT_EQ(item->mime, nullptr);
@@ -520,7 +519,7 @@ TEST_F(ManifestTest,
   for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
                          "http://tizen.org/appcontrol/operation/compose2"}) {
     for (auto uri : {"scheme1://", "scheme2://"}) {
-      ASSERT_IN(boost::make_tuple(operation, uri, ""), found_app_controls);
+      ASSERT_IN(std::make_tuple(operation, uri, ""), found_app_controls);
     }
   }
 }
@@ -533,7 +532,7 @@ TEST_F(ManifestTest, UIApplicationElement_AppControl_CartesianProduct_SkipUri) {
   auto appcontrols = GListRange<appcontrol_x*>(app->appcontrol);
   ASSERT_EQ(Size(&appcontrols), 4);
 
-  std::vector<boost::tuple<std::string, std::string, std::string>>
+  std::vector<std::tuple<std::string, std::string, std::string>>
       found_app_controls;
   for (auto& item : appcontrols) {
     ASSERT_EQ(item->uri, nullptr);
@@ -543,7 +542,7 @@ TEST_F(ManifestTest, UIApplicationElement_AppControl_CartesianProduct_SkipUri) {
   for (auto operation : {"http://tizen.org/appcontrol/operation/compose1",
                          "http://tizen.org/appcontrol/operation/compose2"}) {
     for (auto mime : {"application/text", "application/pdf"}) {
-      ASSERT_IN(boost::make_tuple(operation, "", mime), found_app_controls);
+      ASSERT_IN(std::make_tuple(operation, "", mime), found_app_controls);
     }
   }
 }
@@ -569,7 +568,7 @@ TEST_F(ManifestTest, UIApplicationElement_Icon_Valid) {
   ASSERT_NE(app, nullptr);
   auto icons = GListRange<icon_x*>(app->icon);
   ASSERT_EQ(Size(&icons), 1);
-  ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
+  ASSERT_EQ(fs::path((*icons.begin())->text).filename().string(),
             "test_icon.png");
 }
 
index 398195c2cc9923d18b9bfe609be622a81f6211a3..62a94a1d26444d1c7d023d4922728d7269f9a5d7 100644 (file)
@@ -2,10 +2,12 @@
 // Use of this source code is governed by an apache-2.0 license that can be
 // found in the LICENSE file.
 
+#include <filesystem>
+
 #include "smoke_tests/manifest_test.h"
 
-namespace bf = boost::filesystem;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 TEST_F(ManifestTest, WatchApplicationElement_Valid) {
   StepParseRunner runner(GetMyName());
@@ -76,7 +78,7 @@ TEST_F(ManifestTest, WatchApplicationElement_Icon_Valid) {
   ASSERT_NE(app, nullptr);
   auto icons = GListRange<icon_x*>(app->icon);
   ASSERT_EQ(Size(&icons), 1);
-  ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
+  ASSERT_EQ(fs::path((*icons.begin())->text).filename().string(),
             "test_icon.png");
 }
 
index 6b9d3925962ebf50a9d4a04af2923d80700bc435..fd227c0a7ac3aee0d04e6ad39de36654ee02c7b7 100644 (file)
@@ -2,10 +2,12 @@
 // Use of this source code is governed by an apache-2.0 license that can be
 // found in the LICENSE file.
 
+#include <filesystem>
+
 #include "smoke_tests/manifest_test.h"
 
-namespace bf = boost::filesystem;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 TEST_F(ManifestTest, WidgetApplicationElement_Valid) {
   StepParseRunner runner(GetMyName());
@@ -99,7 +101,7 @@ TEST_F(ManifestTest, WidgetApplicationElement_Icon_Valid) {
   ASSERT_NE(app, nullptr);
   auto icons = GListRange<icon_x*>(app->icon);
   ASSERT_EQ(Size(&icons), 1);
-  ASSERT_EQ(bf::path((*icons.begin())->text).filename().string(),
+  ASSERT_EQ(fs::path((*icons.begin())->text).filename().string(),
             "test_icon.png");
 }
 
index 9c8dafcfd2ee14476cb57649e5f1ffdea122cdf7..288b34c062c1ae62a060b173a91e7fd4ac4331f2 100644 (file)
@@ -2,23 +2,22 @@
 // Use of this source code is governed by an apache-2.0 license that can be
 // found in the LICENSE file.
 
-#include <boost/exception/diagnostic_information.hpp>
-#include <boost/program_options.hpp>
-
 #include <common/utils/subprocess.h>
 #include <smoke_tests/common/smoke_utils.h>
 
+#include <getopt.h>
 #include <gtest/gtest.h>
+#include <unistd.h>
 
+#include <filesystem>
 #include <map>
 #include <string>
 #include <vector>
 
 #include "smoke_tests/tpk_smoke_utils.h"
 
-namespace bf = boost::filesystem;
-namespace bpo = boost::program_options;
 namespace ci = common_installer;
+namespace fs = std::filesystem;
 
 enum class ReqType : int {
   UNKNOWN_REQ,
@@ -106,7 +105,7 @@ class SmokeEnvironment : public testing::Environment {
 
  private:
   ci::RequestMode request_mode_;
-  std::vector<bf::path> backups_;
+  std::vector<fs::path> backups_;
   bool no_backup_;
   BackupType backup_type_;
 };
@@ -142,7 +141,7 @@ class SmokeTest : public testing::Test {
 TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
 
-  bf::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+  fs::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
   int wait_time = delay + interval * test_count;
 
   BackendInterface::SubProcessResult ret = backend.InstallWithSubprocessAndKill(
@@ -153,7 +152,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
   }
   ASSERT_EQ(ret, BackendInterface::SubProcessResult::KILLED);
   std::string pkgid = "recoverypkg";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   if (recovery_file.empty()) {
     std::cout << "recovery file dosen't exist, "
@@ -167,7 +166,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
 
 TEST_F(SmokeTest, RecoveryMode_Tpk_Uninstallation) {
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
-  bf::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+  fs::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
 
   BackendInterface::SubProcessResult ret = backend.InstallWithSubprocess(path);
   if (ret != BackendInterface::SubProcessResult::SUCCESS) {
@@ -184,7 +183,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Uninstallation) {
   }
   ASSERT_EQ(ret, BackendInterface::SubProcessResult::KILLED);
 
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   if (recovery_file.empty()) {
     std::cout << "recovery file dosen't exist, "
@@ -199,8 +198,8 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Uninstallation) {
 TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
 
-  bf::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "RecoveryPkg2.tpk";
+  fs::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "RecoveryPkg2.tpk";
   int wait_time = delay + interval * test_count;
 
   ASSERT_EQ(backend.InstallWithSubprocess(path_old),
@@ -217,7 +216,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
   std::string pkgid = "recoverypkg";
   std::string appid = "recoverypkg";
   std::string exec = "recoverypkg";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   if (recovery_file.empty()) {
     std::cout << "recovery file dosen't exist, "
@@ -237,8 +236,8 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
 TEST_F(SmokeTest, RecoveryMode_ForDelta) {
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
 
-  bf::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "RecoveryPkg.delta";
+  fs::path path_old = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "RecoveryPkg.delta";
   int wait_time = delay + interval * test_count;
 
   ASSERT_EQ(backend.InstallWithSubprocess(path_old),
@@ -255,9 +254,9 @@ TEST_F(SmokeTest, RecoveryMode_ForDelta) {
   std::string pkgid = "recoverypkg";
   std::string appid = "recoverypkg";
   std::string exec = "recoverypkg";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
   if (recovery_file.empty()) {
     std::cout << "recovery file dosen't exist, "
@@ -272,8 +271,8 @@ TEST_F(SmokeTest, RecoveryMode_ForDelta) {
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
   ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION",
       recovery_info->cleanup() ? "2\n" : "1\n", params));
-  bool deleted_exist = bf::exists(root_path / pkgid / "res/DELETED");
-  bool added_exist = bf::exists(root_path / pkgid / "res/ADDED");
+  bool deleted_exist = fs::exists(root_path / pkgid / "res/DELETED");
+  bool added_exist = fs::exists(root_path / pkgid / "res/ADDED");
   ASSERT_NE(deleted_exist, added_exist);
   ASSERT_TRUE(recovery_info->cleanup() ? added_exist : deleted_exist);
 }
@@ -281,7 +280,7 @@ TEST_F(SmokeTest, RecoveryMode_ForDelta) {
 TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
 
-  bf::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
+  fs::path path = kSmokePackagesDirectory / "RecoveryPkg.tpk";
   int wait_time = delay + interval * test_count;
 
   BackendInterface::SubProcessResult ret = backend.MountInstallWithSubprocessAndKill(
@@ -292,7 +291,7 @@ TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
   }
 
   std::string pkgid = "recoverypkg";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   if (recovery_file.empty()) {
     std::cout << "recovery file dosen't exist, "
@@ -308,9 +307,9 @@ TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
 TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
 
-  bf::path path_old =
+  fs::path path_old =
       kSmokePackagesDirectory / "RecoveryPkg.tpk";
-  bf::path path_new =
+  fs::path path_new =
       kSmokePackagesDirectory / "RecoveryPkg2.tpk";
   int wait_time = delay + interval * test_count;
 
@@ -327,7 +326,7 @@ TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
   std::string pkgid = "recoverypkg";
   std::string appid = "recoverypkg";
   std::string exec = "recoverypkg";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   if (recovery_file.empty()) {
     std::cout << "recovery file dosen't exist, "
@@ -351,6 +350,51 @@ TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
 }  // namespace smoke_test
 
 const int kBufSize = 1024;
+const struct option long_opts[] = {
+  { "help", no_argument, nullptr, 'h' },
+  { "install", no_argument, nullptr, 'i' },
+  { "uninstall", no_argument, nullptr, 'd' },
+  { "update", no_argument, nullptr, 'u' },
+  { "delta", no_argument, nullptr, 'D' },
+  { "mount-install", no_argument, nullptr, 'm' },
+  { "mount-update", no_argument, nullptr, 'M' },
+  { "delay", required_argument, nullptr, 't' },
+  { "interval", required_argument, nullptr, 'I' },
+  { "repeat", required_argument, nullptr, 'r' },
+  { "no-backup", no_argument, nullptr, 'n' },
+  { "backup-type", required_argument, nullptr, 'b' },
+  { 0, 0, 0, 0 }
+};
+
+const char kHelpMessage[] = R"(Allowed options:
+  --help                display this help message
+  --install             recovery test for forced termination during package
+                        installing
+  --uninstall           recovery test for forced termination during package
+                        uninstallation
+  --update              recovery test for forced termination during package
+                        updating
+  --delta               recovery test for forced termination during package
+                        delta installing
+  --mount-install       recovery test for forced termination during package
+                        mount-installing
+  --mount-update        recovery test for forced termination during package
+                        mount-updating
+  --delay arg           fixed delay for forced termination
+                        unit : microsecond (ex. 1000000us = 1s)
+  --interval arg        use with repeat option.
+                        as it repeat the interval is added to delay
+                        unit : microsecond (ex. 1000000us = 1s)
+  --repeat arg          option for performing tests repeatedly
+                        enter -1 to test infinitely
+  --no-backup           Do test without backup
+  --backup-type arg     <move|copy> set test's backup type 'move', 'copy and
+                        remove'
+)";
+
+void PrintHelp() {
+  std::cerr << kHelpMessage;
+}
 
 int main(int argc,  char** argv) {
   try {
@@ -363,86 +407,70 @@ int main(int argc,  char** argv) {
     if (getuid() != 0 || request_mode != ci::RequestMode::GLOBAL)
       std::cout << "Run recovery test with user request mode" << std::endl;
 
-    bpo::options_description options("Allowed options");
-    bpo::variables_map opt_map;
-    options.add_options()
-        ("help", "display this help message")
-        ("install",
-            "recovery test for forced termination "
-            "during package installing")
-        ("uninstall",
-            "recovery test for forced termination "
-            "during package uninstallation")
-        ("update",
-            "recovery test for forced termination "
-            "during package updating")
-        ("delta",
-            "recovery test for forced termination "
-            "during package delta installing")
-        ("mount-install",
-            "recovery test for forced termination "
-            "during package mount-installing")
-        ("mount-update",
-            "recovery test for forced termination "
-            "during package mount-updating")
-        ("delay", bpo::value<int>(), "fixed delay for forced termination\n"
-            "unit : microsecond (ex. 1000000us = 1s)")
-        ("interval", bpo::value<int>(),
-            "use with repeat option.\n"
-            "as it repeat the interval is added to delay\n"
-            "unit : microsecond (ex. 1000000us = 1s)")
-        ("repeat", bpo::value<int>(), "option for performing tests repeatedly\n"
-            "enter -1 to test infinitely")
-        ("no-backup", "Do test without backup")
-        ("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
-            "backup type \'move\', \'copy and remove\'");
-    bpo::store(bpo::command_line_parser(argc, argv).
-        options(options).allow_unregistered().run(), opt_map);
-    if (opt_map.count("help")) {
-      std::cerr << options << std::endl;
-      return -1;
-    }
-
-    if (opt_map.count("install"))
-      req_type = ReqType::INSTALL_REQ;
-    if (opt_map.count("uninstall"))
-      req_type = ReqType::UNINSTALL_REQ;
-    else if (opt_map.count("update"))
-      req_type = ReqType::UPDATE_REQ;
-    else if (opt_map.count("delta"))
-      req_type = ReqType::DELTA_REQ;
-    else if (opt_map.count("mount-install"))
-      req_type = ReqType::MOUNT_INSTALL_REQ;
-    else if (opt_map.count("mount-update"))
-      req_type = ReqType::MOUNT_UPDATE_REQ;
-
-    if (opt_map.count("delay"))
-      delay = opt_map["delay"].as<int>();
-
-    if (opt_map.count("interval"))
-      interval = opt_map["interval"].as<int>();
-
-    if (opt_map.count("repeat")) {
-      repeat = true;
-      repeat_count = opt_map["repeat"].as<int>();
-    }
-
-    if (opt_map.count("no-backup"))
-      no_backup = true;
-    if (opt_map.count("backup-type")) {
-      if (opt_map["backup-type"].as<std::string>() == "move") {
-        backup_type = BackupType::MOVE;
-      } else if (opt_map["backup-type"].as<std::string>() == "copy") {
-        backup_type = BackupType::COPY_AND_REMOVE;
-      } else {
-        std::cerr << options << std::endl;
-        return -1;
+    while (true) {
+      int opt = getopt_long(argc, argv, "", long_opts, nullptr);
+      if (opt == -1)
+        break;
+
+      switch (opt) {
+        case 'h':
+          PrintHelp();
+          return -1;
+        case 'i':
+          req_type = ReqType::INSTALL_REQ;
+          break;
+        case 'd':
+          req_type = ReqType::UNINSTALL_REQ;
+          break;
+        case 'u':
+          req_type = ReqType::UPDATE_REQ;
+          break;
+        case 'D':
+          req_type = ReqType::DELTA_REQ;
+          break;
+        case 'm':
+          req_type = ReqType::MOUNT_INSTALL_REQ;
+          break;
+        case 'M':
+          req_type = ReqType::MOUNT_UPDATE_REQ;
+          break;
+        case 't':
+          if (optarg)
+            delay = std::stoi(optarg);
+          break;
+        case 'I':
+          if (optarg)
+            interval = std::stoi(optarg);
+          break;
+        case 'r':
+          if (optarg) {
+            repeat = true;
+            repeat_count = std::stoi(optarg);
+          }
+          break;
+        case 'n':
+          no_backup = true;
+          break;
+        case 'b':
+          if (optarg) {
+            if (strncmp(optarg, "move", strlen("move")) == 0) {
+              backup_type = BackupType::MOVE;
+            } else if (strncmp(optarg, "copy", strlen("copy")) == 0) {
+              backup_type = BackupType::COPY_AND_REMOVE;
+            } else {
+              PrintHelp();
+              return -1;
+            }
+          }
+          break;
+        default:
+          PrintHelp();
+          return -1;
       }
     }
-    bpo::notify(opt_map);
 
     if (req_type == ReqType::UNKNOWN_REQ) {
-      std::cerr << options << std::endl;
+      PrintHelp();
       return 0;
     }
 
index 6940141e3f90d4b7cb6af4e47886d4dba6dbda52..a1b31d7581386d25e5e1b81bbbfefde007d9568c 100644 (file)
@@ -2,24 +2,20 @@
 // Use of this source code is governed by an apache-2.0 license that can be
 // found in the LICENSE file.
 
-#include <boost/exception/diagnostic_information.hpp>
-#include <boost/program_options.hpp>
-
 #include <common/utils/subprocess.h>
 #include <common/utils/file_util.h>
 #include <common/utils/pkgmgr_query.h>
 #include <smoke_tests/common/smoke_utils.h>
 
+#include <getopt.h>
 #include <gtest/gtest.h>
 #include <gtest/gtest-death-test.h>
+#include <unistd.h>
 
 #include "smoke_tests/tpk_smoke_utils.h"
 
 namespace st = smoke_test;
-namespace bf = boost::filesystem;
-namespace bs = boost::system;
 namespace ci = common_installer;
-namespace bpo = boost::program_options;
 
 enum class BackupType : int {
   MOVE,
@@ -75,7 +71,7 @@ class SmokeEnvironment : public testing::Environment {
 
  private:
   ci::RequestMode request_mode_;
-  std::vector<bf::path> backups_;
+  std::vector<fs::path> backups_;
   bool no_backup_;
   BackupType backup_type_;
 };
@@ -136,8 +132,8 @@ class PreloadSmokeTest : public testing::Test {
 //    cause bad results of some smoke tests.
 
 TEST_F(SmokeTest, DeltaMode_Tpk) {
-  bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk.tpk";
-  bf::path delta_package = kSmokePackagesDirectory / "DeltaMode_Tpk.delta";
+  fs::path path = kSmokePackagesDirectory / "DeltaMode_Tpk.tpk";
+  fs::path delta_package = kSmokePackagesDirectory / "DeltaMode_Tpk.delta";
   std::string pkgid = "smokeapp18";
   std::string appid = "smokeapp18.DeltaModeTpk";
   std::string exec = "native";
@@ -146,19 +142,19 @@ TEST_F(SmokeTest, DeltaMode_Tpk) {
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
 
   // Check delta modifications
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "DELETED"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "ADDED"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "native"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" / "native.png"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "DELETED"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "ADDED"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "bin" / "native"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "shared" / "res" / "native.png"));
   ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "MODIFIED", "version 2\n",
       params));
 }
 
 TEST_F(RollbackSmokeTest, DeltaMode) {
-  bf::path path = kSmokePackagesDirectory / "DeltaMode_Tpk_Rollback.tpk";
-  bf::path delta_package = kSmokePackagesDirectory /
+  fs::path path = kSmokePackagesDirectory / "DeltaMode_Tpk_Rollback.tpk";
+  fs::path delta_package = kSmokePackagesDirectory /
       "DeltaMode_Tpk_Rollback.delta";
   std::string pkgid = "smoketpk28";
   std::string appid = "smoketpk28.DeltaModeTpk_Rollback";
@@ -168,12 +164,12 @@ TEST_F(RollbackSmokeTest, DeltaMode) {
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
 
   // Check delta modifications
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
       params.test_user.uid);
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "DELETED"));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "ADDED"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "basicdali"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" /
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res" / "DELETED"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res" / "ADDED"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "bin" / "basicdali"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "shared" / "res" /
                          "basicdali.png"));
   ASSERT_TRUE(ValidateFileContentInPackage(pkgid,
                                            "res/MODIFIED",
@@ -182,29 +178,29 @@ TEST_F(RollbackSmokeTest, DeltaMode) {
 }
 
 TEST_F(SmokeTest, ReinstallMode_Tpk) {
-  bf::path path = kSmokePackagesDirectory / "ReinstallMode_Tpk.tpk";
-  bf::path rds_directory = kSmokePackagesDirectory / "delta_dir";
+  fs::path path = kSmokePackagesDirectory / "ReinstallMode_Tpk.tpk";
+  fs::path rds_directory = kSmokePackagesDirectory / "delta_dir";
   std::string pkgid = "smokeapp25";
   std::string appid = "smokeapp25.ReinstallModeTpk";
   std::string exec = "native";
-  bf::path sdk_expected_directory = kSdkDirectory / "tmp" / pkgid;
+  fs::path sdk_expected_directory = kSdkDirectory / "tmp" / pkgid;
   ASSERT_TRUE(ci::CopyDir(rds_directory, sdk_expected_directory));
   ASSERT_EQ(backend.RDSUpdate(path, pkgid), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
 
   // Check rds modifications
-  bf::path root_path = ci::GetRootAppPath(false,
+  fs::path root_path = ci::GetRootAppPath(false,
       params.test_user.uid);
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "DELETED"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "ADDED"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "bin" / "native"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "shared" / "res" / "native.png"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "DELETED"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "ADDED"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "bin" / "native"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "shared" / "res" / "native.png"));
   ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "MODIFIED", "version 2\n",
       params));
 }
 
 TEST_F(SmokeTest, InstallationMode_Tpk) {
-  bf::path path = kSmokePackagesDirectory / "InstallationMode_Tpk.tpk";
+  fs::path path = kSmokePackagesDirectory / "InstallationMode_Tpk.tpk";
   std::string pkgid = "smokeapp12";
   std::string appid = "smokeapp12.InstallationModeTpk";
   std::string exec = "native";
@@ -213,8 +209,8 @@ TEST_F(SmokeTest, InstallationMode_Tpk) {
 }
 
 TEST_F(SmokeTest, UpdateMode_Tpk) {
-  bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Tpk.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Tpk_2.tpk";
+  fs::path path_old = kSmokePackagesDirectory / "UpdateMode_Tpk.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "UpdateMode_Tpk_2.tpk";
   std::string pkgid = "smokeapp13";
   std::string appid = "smokeapp13.UpdateModeTpk";
   std::string exec = "native";
@@ -226,7 +222,7 @@ TEST_F(SmokeTest, UpdateMode_Tpk) {
 }
 
 TEST_F(SmokeTest, DeinstallationMode_Tpk) {
-  bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Tpk.tpk";
+  fs::path path = kSmokePackagesDirectory / "DeinstallationMode_Tpk.tpk";
   std::string pkgid = "smokeapp14";
   ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
   ASSERT_EQ(backend.Uninstall(pkgid), ci::AppInstaller::Result::OK);
@@ -234,7 +230,7 @@ TEST_F(SmokeTest, DeinstallationMode_Tpk) {
 }
 
 TEST_F(SmokeTest, EnablePkg) {
-  bf::path path = kSmokePackagesDirectory / "EnablePkg.tpk";
+  fs::path path = kSmokePackagesDirectory / "EnablePkg.tpk";
   std::string pkgid = "smokeapp22";
   ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
   ASSERT_EQ(backend.DisablePackage(pkgid), ci::AppInstaller::Result::OK);
@@ -245,7 +241,7 @@ TEST_F(SmokeTest, EnablePkg) {
 }
 
 TEST_F(SmokeTest, DisablePkg) {
-  bf::path path = kSmokePackagesDirectory / "DisablePkg.tpk";
+  fs::path path = kSmokePackagesDirectory / "DisablePkg.tpk";
   std::string pkgid = "smokeapp23";
   std::string appid = "smokeapp23.DisablePkg";
   std::string exec = "=disablepkg";
@@ -256,7 +252,7 @@ TEST_F(SmokeTest, DisablePkg) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
-  bf::path path = kSmokePackagesDirectory / "RecoveryMode_Tpk_Installation.tpk";
+  fs::path path = kSmokePackagesDirectory / "RecoveryMode_Tpk_Installation.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
   std::string test_uid_str = std::to_string(params.test_user.uid);
@@ -264,19 +260,19 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Installation) {
   ASSERT_NE(backend_crash.Wait(), 0);
 
   std::string pkgid = "smokeapp15";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
       GetRecoverFileInfo(recovery_file);
   ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-  ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+  ASSERT_FALSE(fs::exists(recovery_info->unpacked_dir()));
 }
 
 TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
-  bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update_2.tpk";
+  fs::path path_old = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "RecoveryMode_Tpk_Update_2.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
 
@@ -291,7 +287,7 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
   backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
   ASSERT_NE(backend_crash.Wait(), 0);
 
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -300,14 +296,14 @@ TEST_F(SmokeTest, RecoveryMode_Tpk_Update) {
 
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
   ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params));
-  ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+  ASSERT_FALSE(fs::exists(recovery_info->unpacked_dir()));
   ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
   std::string version_recovered = pkg_query2.Version();
   ASSERT_TRUE(version_old == version_recovered);
 }
 
 TEST_F(SmokeTest, MountInstallationMode_Tpk) {
-  bf::path path = kSmokePackagesDirectory / "MountInstallationMode_Tpk.tpk";
+  fs::path path = kSmokePackagesDirectory / "MountInstallationMode_Tpk.tpk";
   std::string pkgid = "smokeapp26";
   std::string appid = "smokeapp26.MountInstallationModeTpk";
   std::string exec = "native";
@@ -317,8 +313,8 @@ TEST_F(SmokeTest, MountInstallationMode_Tpk) {
 }
 
 TEST_F(SmokeTest, MountUpdateMode_Tpk) {
-  bf::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Tpk.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "MountUpdateMode_Tpk_2.tpk";
+  fs::path path_old = kSmokePackagesDirectory / "MountUpdateMode_Tpk.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "MountUpdateMode_Tpk_2.tpk";
   std::string pkgid = "smokeapp27";
   std::string appid = "smokeapp27.MountUpdateModeTpk";
   std::string exec = "native";
@@ -334,11 +330,11 @@ TEST_F(SmokeTest, MountUpdateMode_Tpk) {
 
 TEST_F(SmokeTest, MigrateLegacyExternalImage_Tpk) {
   ASSERT_TRUE(CheckAvailableExternalPath());
-  bf::path path = kSmokePackagesDirectory / "InstallExternal_Tpk_2.tpk";
+  fs::path path = kSmokePackagesDirectory / "InstallExternal_Tpk_2.tpk";
   std::string pkgid = "smokeapp28";
   std::string appid = "smokeapp28.InstallExternalTpk";
   std::string exec = "smokeapp28";
-  bf::path legacy_path = kSmokePackagesDirectory / kLegacyExtImageDir;
+  fs::path legacy_path = kSmokePackagesDirectory / kLegacyExtImageDir;
   std::string test_uid_str = std::to_string(params.test_user.uid);
   if (test_uid_str == kDefaultUserIdStr ||
       params.test_user.uid == kGlobalUserUid) {
@@ -353,7 +349,7 @@ TEST_F(SmokeTest, MigrateLegacyExternalImage_Tpk) {
 
 TEST_F(SmokeTest, InstallExternal_Tpk) {
   ASSERT_TRUE(CheckAvailableExternalPath());
-  bf::path path = kSmokePackagesDirectory / "InstallExternal_Tpk.tpk";
+  fs::path path = kSmokePackagesDirectory / "InstallExternal_Tpk.tpk";
   std::string pkgid = "smokeapp29";
   std::string appid = "smokeapp29.InstallExternalTpk";
   std::string exec = "smokeapp29";
@@ -363,11 +359,11 @@ TEST_F(SmokeTest, InstallExternal_Tpk) {
 }
 
 #define TEP_TEST_STARTING_BLOCK(NUMBER)                                        \
-  bf::path path = kSmokePackagesDirectory / "TEP_Tpk";                         \
+  fs::path path = kSmokePackagesDirectory / "TEP_Tpk";                         \
   path += #NUMBER;                                                             \
   path += ".tpk";                                                              \
-  bf::path tep1 = kSmokePackagesDirectory / "tep1.tep";                        \
-  bf::path tep2 = kSmokePackagesDirectory / "tep2.tep";                        \
+  fs::path tep1 = kSmokePackagesDirectory / "tep1.tep";                        \
+  fs::path tep2 = kSmokePackagesDirectory / "tep2.tep";                        \
   std::string number = std::to_string(50 + NUMBER - 1);                        \
   std::string pkgid = std::string("smokeapp") + number;                        \
   std::string appid = pkgid + ".TEP";                                          \
@@ -425,10 +421,10 @@ TEST_F(RollbackSmokeTest, TEP_Tpk_NoTepInstallTepUpdateRollback) {
   ASSERT_EQ(backend.InstallWithTEP(path, tep2),
       ci::AppInstaller::Result::ERROR);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
       params.test_user.uid);
-  bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
-  ASSERT_FALSE(bf::exists(tep_file));
+  fs::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
+  ASSERT_FALSE(fs::exists(tep_file));
 }
 
 TEST_F(RollbackSmokeTest, TEP_Tpk_TepInstallNoTepUpdateRollback) {
@@ -504,10 +500,10 @@ TEST_F(RollbackSmokeTest, TEP_Tpk_Mount_NoTepInstallTepUpdateRollback) {
             ci::AppInstaller::Result::ERROR);
   ScopedTzipInterface package_mount(pkgid, params.test_user.uid);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
       params.test_user.uid);
-  bf::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
-  ASSERT_FALSE(bf::exists(tep_file));
+  fs::path tep_file = root_path / pkgid / "tep" / "tep2.tep";
+  ASSERT_FALSE(fs::exists(tep_file));
 }
 
 TEST_F(RollbackSmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdateRollback) {
@@ -523,7 +519,7 @@ TEST_F(RollbackSmokeTest, TEP_Tpk_Mount_TepInstallNoTepUpdateRollback) {
 
 TEST_F(PreloadSmokeTest, InstallationMode_Preload) {
   ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
-  bf::path path = kSmokePackagesDirectory / "InstallationMode_Preload.tpk";
+  fs::path path = kSmokePackagesDirectory / "InstallationMode_Preload.tpk";
   std::string pkgid = "smoketpk29";
   std::string appid = "smoketpk29.InstallationModePreload";
   std::string exec = "native";
@@ -533,8 +529,8 @@ TEST_F(PreloadSmokeTest, InstallationMode_Preload) {
 
 TEST_F(PreloadSmokeTest, UpdateMode_Preload) {
   ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
-  bf::path path_old = kSmokePackagesDirectory / "UpdateMode_Preload.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "UpdateMode_Preload2.tpk";
+  fs::path path_old = kSmokePackagesDirectory / "UpdateMode_Preload.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "UpdateMode_Preload2.tpk";
   std::string pkgid = "smoketpk30";
   std::string appid = "smoketpk30.UpdateModePreload";
   std::string exec = "native";
@@ -547,7 +543,7 @@ TEST_F(PreloadSmokeTest, UpdateMode_Preload) {
 
 TEST_F(PreloadSmokeTest, DeinstallationMode_Preload) {
   ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
-  bf::path path = kSmokePackagesDirectory / "DeinstallationMode_Preload.tpk";
+  fs::path path = kSmokePackagesDirectory / "DeinstallationMode_Preload.tpk";
   std::string pkgid = "smoketpk31";
   ASSERT_EQ(backend.InstallPreload(path), ci::AppInstaller::Result::OK);
   ASSERT_EQ(backend.UninstallPreload(pkgid), ci::AppInstaller::Result::OK);
@@ -555,27 +551,27 @@ TEST_F(PreloadSmokeTest, DeinstallationMode_Preload) {
 }
 
 TEST_F(SmokeTest, InstallationMode_GoodSignature) {
-  bf::path path =
+  fs::path path =
       kSmokePackagesDirectory / "InstallationMode_GoodSignature.tpk";
   ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(path));
 }
 
 TEST_F(SmokeTest, InstallationMode_WrongSignature) {
-  bf::path path =
+  fs::path path =
       kSmokePackagesDirectory / "InstallationMode_WrongSignature.tpk";
   ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.Install(path));
 }
 
 TEST_F(RollbackSmokeTest, InstallationMode_Rollback) {
-  bf::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.tpk";
+  fs::path path = kSmokePackagesDirectory / "InstallationMode_Rollback.tpk";
   std::string pkgid = "smoketpk34";
   ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.Install(path));
   ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
 }
 
 TEST_F(SmokeTest, RecoveryMode_ForDelta) {
-  bf::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
+  fs::path path_old = kSmokePackagesDirectory / "RecoveryMode_ForDelta.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "RecoveryMode_ForDelta.delta";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Install(path_old));
   ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
@@ -586,7 +582,7 @@ TEST_F(SmokeTest, RecoveryMode_ForDelta) {
   std::string pkgid = "smoketpk35";
   std::string appid = "smoketpk35.RecoveryMode_ForDelta";
   std::string exec = "smoketpk35";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -596,16 +592,16 @@ TEST_F(SmokeTest, RecoveryMode_ForDelta) {
 
   ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/MODIFIED", "version 1",
       params));
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/DELETED"));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res/ADDED"));
-  ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/DELETED"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res/ADDED"));
+  ASSERT_FALSE(fs::exists(recovery_info->unpacked_dir()));
 }
 
 TEST_F(RollbackSmokeTest, UpdateMode) {
-  bf::path old_path = kSmokePackagesDirectory / "UpdateMode_Rollback.tpk";
-  bf::path new_path = kSmokePackagesDirectory / "UpdateMode_Rollback2.tpk";
+  fs::path old_path = kSmokePackagesDirectory / "UpdateMode_Rollback.tpk";
+  fs::path new_path = kSmokePackagesDirectory / "UpdateMode_Rollback2.tpk";
   std::string pkgid = "smoketpk36";
   std::string appid = "smoketpk36.UpdateMode_Rollback";
   std::string exec = "smoketpk36";
@@ -623,7 +619,7 @@ TEST_F(RollbackSmokeTest, UpdateMode) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
-  bf::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.tpk";
+  fs::path path = kSmokePackagesDirectory / "RecoveryMode_ForMountInstall.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
   std::string test_uid_str = std::to_string(params.test_user.uid);
@@ -631,20 +627,20 @@ TEST_F(SmokeTest, RecoveryMode_ForMountInstall) {
   ASSERT_NE(0, backend_crash.Wait());
 
   std::string pkgid = "smoketpk37";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
       GetRecoverFileInfo(recovery_file);
   ASSERT_EQ(ci::AppInstaller::Result::OK, backend.Recover(recovery_file));
   ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-  ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+  ASSERT_FALSE(fs::exists(recovery_info->unpacked_dir()));
 }
 
 TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
-  bf::path path_old =
+  fs::path path_old =
       kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate.tpk";
-  bf::path path_new =
+  fs::path path_new =
       kSmokePackagesDirectory / "RecoveryMode_ForMountUpdate2.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ASSERT_EQ(ci::AppInstaller::Result::OK, backend.MountInstall(path_old));
@@ -664,7 +660,7 @@ TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
   ScopedTzipInterface poweroff_unmount_interface(pkgid, params.test_user.uid);
   poweroff_unmount_interface.Release();
 
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -676,14 +672,14 @@ TEST_F(SmokeTest, RecoveryMode_ForMountUpdate) {
   ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params));
   ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "shared/res/VERSION", "1",
           params));
-  ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+  ASSERT_FALSE(fs::exists(recovery_info->unpacked_dir()));
   ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
   std::string version_recovered = pkg_query2.Version();
   ASSERT_TRUE(version_old == version_recovered);
 }
 
 TEST_F(RollbackSmokeTest, MountInstallationMode) {
-  bf::path path =
+  fs::path path =
       kSmokePackagesDirectory / "MountInstallationMode_Rollback.tpk";
   std::string pkgid = "smoketpk39";
   ASSERT_EQ(ci::AppInstaller::Result::ERROR, backend.MountInstall(path));
@@ -692,8 +688,8 @@ TEST_F(RollbackSmokeTest, MountInstallationMode) {
 }
 
 TEST_F(RollbackSmokeTest, MountUpdateMode) {
-  bf::path old_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback.tpk";
-  bf::path new_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback2.tpk";
+  fs::path old_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback.tpk";
+  fs::path new_path = kSmokePackagesDirectory / "MountUpdateMode_Rollback2.tpk";
   std::string pkgid = "smoketpk40";
   std::string appid = "smoketpk40.MountUpdateMode_Rollback";
   std::string exec = "smoketpk40";
@@ -715,11 +711,11 @@ TEST_F(RollbackSmokeTest, MountUpdateMode) {
 
 TEST_F(SmokeTest, ManifestDirectInstallMode) {
   ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
-  bf::path src_path = kSmokePackagesDirectory / "ManifestDirectInstallMode";
+  fs::path src_path = kSmokePackagesDirectory / "ManifestDirectInstallMode";
   std::string pkgid = "smoketpk41";
   std::string appid = "smoketpk41.ManifestDirectInstallMode";
   std::string exec = "basicui";
-  bf::path pkg_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path pkg_path = ci::GetRootAppPath(params.is_readonly,
       params.test_user.uid);
 
   ci::CopyDir(src_path / pkgid, pkg_path / pkgid);
@@ -731,7 +727,7 @@ TEST_F(SmokeTest, ManifestDirectInstallMode) {
 }
 
 TEST_F(SmokeTest, ManifestDirectUpdateMode) {
-  bf::path path = kSmokePackagesDirectory / "ManifestDirectUpdateMode.tpk";
+  fs::path path = kSmokePackagesDirectory / "ManifestDirectUpdateMode.tpk";
   std::string pkgid = "smoketpk42";
   std::string appid = "smoketpk42.ManifestDirectUpdateMode";
   std::string exec = "basicui";
@@ -748,7 +744,7 @@ TEST_F(SmokeTest, ManifestDirectUpdateMode) {
 
 TEST_F(PreloadSmokeTest, ReadonlyUpdateInstallMode) {
   ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
-  bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateInstallMode.tpk";
+  fs::path path = kSmokePackagesDirectory / "ReadonlyUpdateInstallMode.tpk";
   std::string pkgid = "smoketpk43";
   std::string appid = "smoketpk43.ReadonlyUpdateInstallMode";
   std::string exec = "basicui";
@@ -763,7 +759,7 @@ TEST_F(PreloadSmokeTest, ReadonlyUpdateInstallMode) {
 
 TEST_F(PreloadSmokeTest, ReadonlyUpdateUninstallMode) {
   ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
-  bf::path path = kSmokePackagesDirectory / "ReadonlyUpdateUninstallMode.tpk";
+  fs::path path = kSmokePackagesDirectory / "ReadonlyUpdateUninstallMode.tpk";
   std::string pkgid = "smoketpk44";
   std::string appid = "smoketpk44.ReadonlyUpdateUninstallMode";
   std::string exec = "basicui";
@@ -785,7 +781,7 @@ TEST_F(PreloadSmokeTest, ReadonlyUpdateUninstallMode) {
 
 TEST_F(SmokeTest, InstallExtended_Tpk) {
   ASSERT_TRUE(CheckAvailableExtendedPath());
-  bf::path path = kSmokePackagesDirectory / "InstallExtended_Tpk.tpk";
+  fs::path path = kSmokePackagesDirectory / "InstallExtended_Tpk.tpk";
   std::string pkgid = "smoketpk45";
   std::string appid = "smoketpk45.InstallExtendedTpk";
   std::string exec = "smoketpk45.InstallExtendedTpk";
@@ -795,7 +791,7 @@ TEST_F(SmokeTest, InstallExtended_Tpk) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_CrashAfterUnzip) {
-  bf::path path = kSmokePackagesDirectory / "RecoveryMode_CrashAfterUnzip.tpk";
+  fs::path path = kSmokePackagesDirectory / "RecoveryMode_CrashAfterUnzip.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
   std::string test_uid_str = std::to_string(params.test_user.uid);
@@ -804,7 +800,7 @@ TEST_F(SmokeTest, RecoveryMode_CrashAfterUnzip) {
   ASSERT_NE(backend_crash.Wait(), 0);
 
   std::string pkgid = "smokeapp47";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -812,12 +808,12 @@ TEST_F(SmokeTest, RecoveryMode_CrashAfterUnzip) {
   ASSERT_TRUE(recovery_info ? true : false);
   ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(CheckPackageNonExistance(pkgid, params));
-  ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+  ASSERT_FALSE(fs::exists(recovery_info->unpacked_dir()));
 }
 
 TEST_F(RollbackSmokeTest, UpdateMode_RollbackSharedDataUpdate) {
-  bf::path path_old = kSmokePackagesDirectory / "UpdateMode_SharedData.tpk";
-  bf::path path_new = kSmokePackagesDirectory / "UpdateMode_SharedData_2.tpk";
+  fs::path path_old = kSmokePackagesDirectory / "UpdateMode_SharedData.tpk";
+  fs::path path_new = kSmokePackagesDirectory / "UpdateMode_SharedData_2.tpk";
   std::string pkgid = "smoketpk.shareddata";
   std::string appid = "smoketpk.shareddata";
   std::string exec = "shareddata";
@@ -828,8 +824,8 @@ TEST_F(RollbackSmokeTest, UpdateMode_RollbackSharedDataUpdate) {
 }
 
 TEST_F(RollbackSmokeTest, UpdateMode_RollbackNonSharedDataUpdate) {
-  bf::path path_old = kSmokePackagesDirectory / "UpdateMode_NonSharedData.tpk";
-  bf::path path_new =
+  fs::path path_old = kSmokePackagesDirectory / "UpdateMode_NonSharedData.tpk";
+  fs::path path_new =
       kSmokePackagesDirectory / "UpdateMode_NonSharedData_2.tpk";
   std::string pkgid = "smoketpk.non-shareddata";
   std::string appid = "smoketpk.non-shareddata";
@@ -841,9 +837,9 @@ TEST_F(RollbackSmokeTest, UpdateMode_RollbackNonSharedDataUpdate) {
 }
 
 TEST_F(SmokeTest, RecoveryMode_SharedDataUpdate) {
-  bf::path path_old =
+  fs::path path_old =
       kSmokePackagesDirectory / "RecoveryMode_SharedData.tpk";
-  bf::path path_new =
+  fs::path path_new =
       kSmokePackagesDirectory / "RecoveryMode_SharedData_2.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
@@ -855,7 +851,7 @@ TEST_F(SmokeTest, RecoveryMode_SharedDataUpdate) {
   std::string pkgid = "smoketpk.recovery-shareddata";
   std::string appid = "smoketpk.recovery-shareddata";
   std::string exec = "shareddata";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -864,13 +860,13 @@ TEST_F(SmokeTest, RecoveryMode_SharedDataUpdate) {
 
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
   ASSERT_TRUE(CheckSharedDataExistance(pkgid, params));
-  ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+  ASSERT_FALSE(fs::exists(recovery_info->unpacked_dir()));
 }
 
 TEST_F(SmokeTest, RecoveryMode_NonSharedDataUpdate) {
-  bf::path path_old =
+  fs::path path_old =
       kSmokePackagesDirectory / "RecoveryMode_NonSharedData.tpk";
-  bf::path path_new =
+  fs::path path_new =
       kSmokePackagesDirectory / "RecoveryMode_NonSharedData_2.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
@@ -882,7 +878,7 @@ TEST_F(SmokeTest, RecoveryMode_NonSharedDataUpdate) {
   std::string pkgid = "smoketpk.recovery-non-shareddata";
   std::string appid = "smoketpk.recovery-non-shareddata";
   std::string exec = "shareddata";
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -891,14 +887,14 @@ TEST_F(SmokeTest, RecoveryMode_NonSharedDataUpdate) {
 
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
   ASSERT_TRUE(CheckSharedDataNonExistance(pkgid, params));
-  ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+  ASSERT_FALSE(fs::exists(recovery_info->unpacked_dir()));
 }
 
 TEST_F(PreloadSmokeTest, RecoveryMode_ForReadonlyUpdateInstall) {
   ASSERT_EQ(getuid(), 0) << "Test cannot be run by normal user";
-  bf::path path_old = kSmokePackagesDirectory /
+  fs::path path_old = kSmokePackagesDirectory /
       "RecoveryMode_ForReadonlyUpdateInstall.tpk";
-  bf::path path_new = kSmokePackagesDirectory /
+  fs::path path_new = kSmokePackagesDirectory /
       "RecoveryMode_ForReadonlyUpdateInstall_2.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
   ASSERT_EQ(backend.InstallPreload(path_old), ci::AppInstaller::Result::OK);
@@ -914,7 +910,7 @@ TEST_F(PreloadSmokeTest, RecoveryMode_ForReadonlyUpdateInstall) {
   backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
   ASSERT_NE(backend_crash.Wait(), 0);
 
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -923,94 +919,94 @@ TEST_F(PreloadSmokeTest, RecoveryMode_ForReadonlyUpdateInstall) {
 
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
   ASSERT_TRUE(ValidateFileContentInPackage(pkgid, "res/VERSION", "1", params));
-  ASSERT_FALSE(bf::exists(recovery_info->unpacked_dir()));
+  ASSERT_FALSE(fs::exists(recovery_info->unpacked_dir()));
   ci::PkgQueryInterface pkg_query2(pkgid, params.test_user.uid, true);
   std::string version_recovered = pkg_query2.Version();
   ASSERT_TRUE(version_old == version_recovered);
 }
 
 TEST_F(SmokeTest, InstallationMode_ResControl) {
-  bf::path path = kSmokePackagesDirectory / "InstallationMode_ResControl.tpk";
+  fs::path path = kSmokePackagesDirectory / "InstallationMode_ResControl.tpk";
   std::string pkgid = "smoketpk47";
   std::string appid = "smoketpk47.InstallationMode_ResControl";
   std::string exec = "native";
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
 
   ASSERT_EQ(backend.Install(path), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/allowed"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/global"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/allowed"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/global"));
 }
 
 TEST_F(SmokeTest, UpdateMode_AddResControl) {
-  bf::path path_old = kSmokePackagesDirectory
+  fs::path path_old = kSmokePackagesDirectory
       / "UpdateMode_AddResControl.tpk";
-  bf::path path_new = kSmokePackagesDirectory
+  fs::path path_new = kSmokePackagesDirectory
       / "UpdateMode_AddResControl_2.tpk";
   std::string pkgid = "smoketpk48";
   std::string appid = "smoketpk48.UpdateMode_AddResControl";
   std::string exec = "native";
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
 
   ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res/mount/allowed"));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res/mount/global"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res/mount/allowed"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res/mount/global"));
 
   ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/allowed"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/global"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/allowed"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/global"));
 }
 
 TEST_F(SmokeTest, UpdateMode_RemoveResControl) {
-  bf::path path_old = kSmokePackagesDirectory
+  fs::path path_old = kSmokePackagesDirectory
       / "UpdateMode_RemoveResControl.tpk";
-  bf::path path_new = kSmokePackagesDirectory
+  fs::path path_new = kSmokePackagesDirectory
       / "UpdateMode_RemoveResControl_2.tpk";
   std::string pkgid = "smoketpk49";
   std::string appid = "smoketpk49.UpdateMode_RemoveResControl";
   std::string exec = "native";
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
 
   ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/allowed"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/global"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/allowed"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/global"));
 
   ASSERT_EQ(backend.Install(path_new), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res/mount/allowed"));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res/mount/global"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res/mount/allowed"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res/mount/global"));
 }
 
 TEST_F(SmokeTest, RecoveryMode_AddResControl) {
-  bf::path path_old = kSmokePackagesDirectory
+  fs::path path_old = kSmokePackagesDirectory
       / "RecoveryMode_AddResControl.tpk";
-  bf::path path_new = kSmokePackagesDirectory
+  fs::path path_new = kSmokePackagesDirectory
       / "RecoveryMode_AddResControl_2.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
 
   std::string pkgid = "smoketpk50";
   std::string appid = "smoketpk50.RecoveryMode_AddResControl";
   std::string exec = "native";
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
 
   ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res/mount/allowed"));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res/mount/global"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res/mount/allowed"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res/mount/global"));
 
   ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
   std::string test_uid_str = std::to_string(params.test_user.uid);
   backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
   ASSERT_NE(backend_crash.Wait(), 0);
 
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -1018,34 +1014,34 @@ TEST_F(SmokeTest, RecoveryMode_AddResControl) {
   ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
 
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res/mount/allowed"));
-  ASSERT_FALSE(bf::exists(root_path / pkgid / "res/mount/global"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res/mount/allowed"));
+  ASSERT_FALSE(fs::exists(root_path / pkgid / "res/mount/global"));
 }
 
 TEST_F(SmokeTest, RecoveryMode_RemoveResControl) {
-  bf::path path_old = kSmokePackagesDirectory
+  fs::path path_old = kSmokePackagesDirectory
       / "RecoveryMode_RemoveResControl.tpk";
-  bf::path path_new = kSmokePackagesDirectory
+  fs::path path_new = kSmokePackagesDirectory
       / "RecoveryMode_RemoveResControl_2.tpk";
   RemoveAllRecoveryFiles("/tpk-recovery", params.test_user.uid);
 
   std::string pkgid = "smoketpk51";
   std::string appid = "smoketpk51.RecoveryMode_RemoveResControl";
   std::string exec = "native";
-  bf::path root_path = ci::GetRootAppPath(params.is_readonly,
+  fs::path root_path = ci::GetRootAppPath(params.is_readonly,
                                           params.test_user.uid);
 
   ASSERT_EQ(backend.Install(path_old), ci::AppInstaller::Result::OK);
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/allowed"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/global"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/allowed"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/global"));
 
   ci::Subprocess backend_crash("/usr/bin/tpk-installer-ut/smoke-test-helper");
   std::string test_uid_str = std::to_string(params.test_user.uid);
   backend_crash.Run("-i", path_new.string(), "-u", test_uid_str.c_str());
   ASSERT_NE(backend_crash.Wait(), 0);
 
-  bf::path recovery_file = FindRecoveryFile("/tpk-recovery",
+  fs::path recovery_file = FindRecoveryFile("/tpk-recovery",
       params.test_user.uid);
   ASSERT_FALSE(recovery_file.empty());
   std::unique_ptr<ci::recovery::RecoveryFile> recovery_info =
@@ -1053,12 +1049,23 @@ TEST_F(SmokeTest, RecoveryMode_RemoveResControl) {
   ASSERT_EQ(backend.Recover(recovery_file), ci::AppInstaller::Result::OK);
 
   ASSERT_TRUE(ValidatePackage(pkgid, {appid, exec}, params));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/allowed"));
-  ASSERT_TRUE(bf::exists(root_path / pkgid / "res/mount/global"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/allowed"));
+  ASSERT_TRUE(fs::exists(root_path / pkgid / "res/mount/global"));
 }
 
 }  // namespace smoke_test
 
+const char kHelpMessage[] = R"(Allowed options:
+  --help                display this help message
+  --no-backup           Do test without backup
+  --backup-type arg     <move|copy> set test's backup type 'move', 'copy and
+                        remove'
+)";
+
+void PrintHelp() {
+  std::cerr << kHelpMessage;
+}
+
 int main(int argc,  char** argv) {
   try {
     bool no_backup = false;
@@ -1071,39 +1078,40 @@ int main(int argc,  char** argv) {
     }
     testing::InitGoogleTest(&argc, argv);
 
-    bpo::options_description options("Allowed options");
-    bpo::variables_map opt_map;
-    try {
-      options.add_options()
-          ("help", "display this help message")
-          ("no-backup",  "Do test without backup")
-          ("backup-type", bpo::value<std::string>(), "<move|copy> set test's "
-              "backup type \'move\', \'copy and remove\'");
-      bpo::store(bpo::command_line_parser(argc, argv).
-          options(options).allow_unregistered().run(), opt_map);
-      if (opt_map.count("help")) {
-        std::cerr << options << std::endl;
-        return -1;
-      }
-
-      if (opt_map.count("no-backup"))
-        no_backup = true;
-      if (opt_map.count("backup-type")) {
-        if (opt_map["backup-type"].as<std::string>() == "move") {
-          backup_type = BackupType::MOVE;
-        } else if (opt_map["backup-type"].as<std::string>() == "copy") {
-          backup_type = BackupType::COPY_AND_REMOVE;
-        } else {
-          std::cerr << options << std::endl;
+    const struct option long_opts[] = {
+      { "help", no_argument, nullptr, 'h' },
+      { "no-backup", no_argument, nullptr, 'n' },
+      { "backup-type", required_argument, nullptr, 'b' },
+      { 0, 0, 0, 0 },
+    };
+
+    while (true) {
+      int opt = getopt_long(argc, argv, "", long_opts, nullptr);
+      if (opt == -1)
+        break;
+
+      switch (opt) {
+        case 'h':
+          PrintHelp();
           return -1;
-        }
+        case 'n':
+          no_backup = true;
+          break;
+        case 'b':
+          if (optarg) {
+            if (strcmp(optarg, "move") == 0) {
+              backup_type = BackupType::MOVE;
+            } else if (strcmp(optarg, "copy") == 0) {
+              backup_type = BackupType::COPY_AND_REMOVE;
+            } else {
+              PrintHelp();
+              return -1;
+            }
+          }
+          break;
+        default:
+          break;
       }
-      bpo::notify(opt_map);
-    } catch (...) {
-      std::cerr << "Exception occurred: "
-                << boost::current_exception_diagnostic_information()
-                << std::endl;
-      return -1;
     }
 
     ::env = static_cast<smoke_test::SmokeEnvironment*>(
index 47588c4d61594ca84b670ded289bffc39d13021a..a0091d43b12fd722befe25f1dae2181e84dda581 100644 (file)
@@ -16,7 +16,7 @@ namespace st = smoke_test;
 
 namespace smoke_test {
 
-const bf::path kSmokePackagesDirectory =
+const fs::path kSmokePackagesDirectory =
     "/usr/share/tpk-installer-ut/test_samples/smoke/";
 
 bool ValidatePackage(const std::string& pkgid,
@@ -61,7 +61,7 @@ common_installer::Subprocess TpkBackendInterface::CreateSubprocess() const {
 
 TpkBackendInterface::CommandResult
 TpkBackendInterface::InstallWithTEP(
-    const bf::path& path, const bf::path& tep) const {
+    const fs::path& path, const fs::path& tep) const {
   const char* argv[] = {"", "-i", path.c_str(), "-u", uid_str_.c_str(),
                         "-e", tep.c_str()};
   return CallBackend(SIZEOFARRAY(argv), argv);
@@ -69,7 +69,7 @@ TpkBackendInterface::InstallWithTEP(
 
 TpkBackendInterface::CommandResult
 TpkBackendInterface::MountInstallWithTEP(
-    const bf::path& path, const bf::path& tep) const {
+    const fs::path& path, const fs::path& tep) const {
   const char* argv[] = {"", "-w", path.c_str(), "-u", uid_str_.c_str(),
                         "-e", tep.c_str()};
   return CallBackend(SIZEOFARRAY(argv), argv);
@@ -77,7 +77,7 @@ TpkBackendInterface::MountInstallWithTEP(
 
 TpkBackendInterface::CommandResult
 TpkBackendInterface::InstallSuccessWithTEP(
-    const bf::path& path, const bf::path& tep) const {
+    const fs::path& path, const fs::path& tep) const {
   RequestResult tmp_mode = mode_;
   RequestResult &original_mode = const_cast<RequestResult&>(mode_);
   original_mode = RequestResult::NORMAL;
@@ -91,7 +91,7 @@ TpkBackendInterface::InstallSuccessWithTEP(
 
 TpkBackendInterface::CommandResult
 TpkBackendInterface::MountInstallSuccessWithTEP(
-    const bf::path& path, const bf::path& tep) const {
+    const fs::path& path, const fs::path& tep) const {
   RequestResult tmp_mode = mode_;
   RequestResult &original_mode = const_cast<RequestResult&>(mode_);
   original_mode = RequestResult::NORMAL;
@@ -105,7 +105,7 @@ TpkBackendInterface::MountInstallSuccessWithTEP(
 
 TpkBackendInterface::SubProcessResult
 TpkBackendInterface::InstallWithTEPWithSubprocess(
-    const bf::path& path, const bf::path& tep) const {
+    const fs::path& path, const fs::path& tep) const {
   std::vector<std::string> args =
       {"", "-i", path.string(), "-u", uid_str_, "-e", tep.string()};
   return RunSubprocess(args);
@@ -113,7 +113,7 @@ TpkBackendInterface::InstallWithTEPWithSubprocess(
 
 TpkBackendInterface::SubProcessResult
 TpkBackendInterface::MountInstallWithTEPWithSubprocess(
-    const bf::path& path, const bf::path& tep) const {
+    const fs::path& path, const fs::path& tep) const {
   std::vector<std::string> args =
       {"", "-w", path.string(), "-u", uid_str_, "-e", tep.string()};
   return RunSubprocess(args);
index 941ad4d39fc630fc17fb255ad2250ecfd8a2e221..fd83b3bdb36b08e93bd57737256c5321faabb308 100644 (file)
@@ -19,7 +19,7 @@
 
 namespace smoke_test {
 
-extern const bf::path kSmokePackagesDirectory;
+extern const fs::path kSmokePackagesDirectory;
 
 bool ValidatePackage(const std::string& pkgid,
     const std::pair<std::string, std::string>& app,
@@ -36,19 +36,19 @@ bool ValidateExtendedPackage(const std::string& pkgid,
 class TpkBackendInterface: public BackendInterface {
  public:
   using BackendInterface::BackendInterface;
-  CommandResult InstallWithTEP(const bf::path& path,
-      const bf::path& tep) const;
-  CommandResult InstallSuccessWithTEP(const bf::path& path,
-      const bf::path& tep) const;
-  CommandResult MountInstallWithTEP(const bf::path& path,
-      const bf::path& tep) const;
-  CommandResult MountInstallSuccessWithTEP(const bf::path& path,
-      const bf::path& tep) const;
-
-  SubProcessResult InstallWithTEPWithSubprocess(const bf::path& path,
-      const bf::path& tep) const;
-  SubProcessResult MountInstallWithTEPWithSubprocess(const bf::path& path,
-      const bf::path& tep) const;
+  CommandResult InstallWithTEP(const fs::path& path,
+      const fs::path& tep) const;
+  CommandResult InstallSuccessWithTEP(const fs::path& path,
+      const fs::path& tep) const;
+  CommandResult MountInstallWithTEP(const fs::path& path,
+      const fs::path& tep) const;
+  CommandResult MountInstallSuccessWithTEP(const fs::path& path,
+      const fs::path& tep) const;
+
+  SubProcessResult InstallWithTEPWithSubprocess(const fs::path& path,
+      const fs::path& tep) const;
+  SubProcessResult MountInstallWithTEPWithSubprocess(const fs::path& path,
+      const fs::path& tep) const;
 
   AppQueryInterfacePtr CreateQueryInterface() const override;
   AppInstallerPtr CreateInstaller(