From cece81fdeb746d2d9f624b9c38ba947430678fca Mon Sep 17 00:00:00 2001 From: "ho.namkoong" Date: Tue, 4 Feb 2014 11:17:10 +0900 Subject: [PATCH] SDB: blocking native install test when native plugin is not installed Some SDK does not support native app. In this case, test case for install and uninstall native app fails. For solving this, we check whether native plugin is installed or not in SDK Change-Id: I04e6cd931b49fe3f4dbd0676bda2805eb019642e Signed-off-by: ho.namkoong --- .../test/src/org/tizen/common/sdb/InstallTest.java | 4 +++- .../test/src/org/tizen/common/sdb/SdbTestUtil.java | 17 ++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/org.tizen.common/test/src/org/tizen/common/sdb/InstallTest.java b/org.tizen.common/test/src/org/tizen/common/sdb/InstallTest.java index 34ed9a7..d368072 100644 --- a/org.tizen.common/test/src/org/tizen/common/sdb/InstallTest.java +++ b/org.tizen.common/test/src/org/tizen/common/sdb/InstallTest.java @@ -135,7 +135,9 @@ public class InstallTest { final String appId = "ZFPK8xqL5F"; final String copiedTpkName = "copied.tpk"; - test_installUninstall(tpkName, copiedTpkName, appId); + if(SdbTestUtil.isNativePluginInstalled()) { + test_installUninstall(tpkName, copiedTpkName, appId); + } } /** diff --git a/org.tizen.common/test/src/org/tizen/common/sdb/SdbTestUtil.java b/org.tizen.common/test/src/org/tizen/common/sdb/SdbTestUtil.java index a35a6a7..06607b7 100644 --- a/org.tizen.common/test/src/org/tizen/common/sdb/SdbTestUtil.java +++ b/org.tizen.common/test/src/org/tizen/common/sdb/SdbTestUtil.java @@ -53,16 +53,17 @@ class SdbTestUtil { static final String LOOPBACK_IP = "127.0.0.1"; static final int MAX_TRIAL = 10; static final char CTRL_C = '\u0003'; + static String SDK_PATH; static String SDB_PATH; static { - SDB_PATH = System.getProperty("TIZEN_SDK"); + SDK_PATH = System.getProperty("TIZEN_SDK"); - if(StringUtil.isEmpty(SDB_PATH)) { + if(StringUtil.isEmpty(SDK_PATH)) { SDB_PATH = "sdb"; } else { - SDB_PATH = FileUtil.appendPath(SDB_PATH, "tools/sdb"); + SDB_PATH = FileUtil.appendPath(SDK_PATH, "tools/sdb"); } } @@ -107,6 +108,16 @@ class SdbTestUtil { return resultPorts; } + static boolean isNativePluginInstalled() throws Exception { + if(StringUtil.isEmpty(SDK_PATH)) { + return false; + } + + String toolChainPath = FileUtil.appendPath(SDK_PATH, "tools/smart-build-interface"); + + return new File(toolChainPath).exists(); + } + /** * Get serial numbers of connected targets * -- 2.7.4