modify codes related to getting app_path. 65/58865/3 accepted/tizen/mobile/20160205.064214 accepted/tizen/tv/20160205.064227 accepted/tizen/wearable/20160205.064247 submit/tizen/20160205.051501
authorjongmyeongko <jongmyeong.ko@samsung.com>
Thu, 4 Feb 2016 07:59:03 +0000 (16:59 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Fri, 5 Feb 2016 04:43:51 +0000 (20:43 -0800)
Requires:
https://review.tizen.org/gerrit/#/c/58863

Change-Id: I1b971a87a8aa534a4a6526d9c3b6a70046a986d0
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/unit_tests/smoke_test.cc
src/wgt/wgt_app_query_interface.cc

index 5373085..f23d98b 100644 (file)
@@ -62,7 +62,7 @@ class StepCrash : public ci::Step {
 };
 
 void RemoveAllRecoveryFiles() {
-  bf::path root_path = ci::GetRootAppPath();
+  bf::path root_path = ci::GetRootAppPath(false);
   if (!bf::exists(root_path))
     return;
   for (auto& dir_entry : boost::make_iterator_range(
@@ -77,7 +77,7 @@ void RemoveAllRecoveryFiles() {
 }
 
 bf::path FindRecoveryFile() {
-  bf::path root_path = ci::GetRootAppPath();
+  bf::path root_path = ci::GetRootAppPath(false);
   for (auto& dir_entry : boost::make_iterator_range(
          bf::directory_iterator(root_path), bf::directory_iterator())) {
     if (bf::is_regular_file(dir_entry)) {
@@ -92,7 +92,7 @@ bf::path FindRecoveryFile() {
 bool ValidateFileContentInPackage(const std::string& pkgid,
                                   const std::string& relative,
                                   const std::string& expected) {
-  bf::path root_path = ci::GetRootAppPath();
+  bf::path root_path = ci::GetRootAppPath(false);
   bf::path file_path = root_path / pkgid / relative;
   if (!bf::exists(file_path)) {
     LOG(ERROR) << file_path << " doesn't exist";
@@ -113,7 +113,7 @@ bool ValidateFileContentInPackage(const std::string& pkgid,
 }
 
 void ValidatePackageFS(const std::string& pkgid, const std::string& appid) {
-  bf::path root_path = ci::GetRootAppPath();
+  bf::path root_path = ci::GetRootAppPath(false);
   bf::path package_path = root_path / pkgid;
   bf::path binary_path = package_path / "bin" / appid;
   bf::path data_path = package_path / "data";
@@ -150,7 +150,7 @@ void ValidatePackageFS(const std::string& pkgid, const std::string& appid) {
 }
 
 void PackageCheckCleanup(const std::string& pkgid, const std::string& appid) {
-  bf::path root_path = ci::GetRootAppPath();
+  bf::path root_path = ci::GetRootAppPath(false);
   bf::path package_path = root_path / pkgid;
   ASSERT_FALSE(bf::exists(package_path));
 
@@ -367,7 +367,7 @@ TEST_F(SmokeTest, RDSMode) {
   ValidatePackage(pkgid, appid);
 
   // Check delta modifications
-  bf::path root_path = ci::GetRootAppPath();
+  bf::path root_path = ci::GetRootAppPath(false);
   ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "wgt" / "DELETED"));
   ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "ADDED"));
   ValidateFileContentInPackage(pkgid, "res/wgt/MODIFIED", "2\n");
@@ -383,7 +383,7 @@ TEST_F(SmokeTest, DeltaMode) {
   ValidatePackage(pkgid, appid);
 
   // Check delta modifications
-  bf::path root_path = ci::GetRootAppPath();
+  bf::path root_path = ci::GetRootAppPath(false);
   ASSERT_FALSE(bf::exists(root_path / pkgid / "res" / "wgt" / "DELETED"));
   ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "ADDED"));
   ASSERT_TRUE(bf::exists(root_path / pkgid / "res" / "wgt" / "css" / "style.css"));  // NOLINT
index 2798080..b45389c 100644 (file)
@@ -115,7 +115,7 @@ bool WgtAppQueryInterface::IsHybridApplication(int argc, char** argv) {
   if (arg.find("apps_rw/recovery-") != std::string::npos)
     arg = ReadPkgidFromRecovery(arg);
   if (ci::IsPackageInstalled(arg, ci::GetRequestMode())) {
-    bf::path package_directory(ci::GetRootAppPath());
+    bf::path package_directory(ci::GetRootAppPath(false));
     if (bf::exists(package_directory / arg / kTizenManifestLocation) &&
         bf::exists(package_directory / arg / kHybridConfigLocation))
       return true;