[Title] add some tizen platform specific command related debugging
authoryoonki.park <yoonki.park@samsung.com>
Tue, 30 Oct 2012 14:49:10 +0000 (23:49 +0900)
committeryoonki.park <yoonki.park@samsung.com>
Thu, 1 Nov 2012 01:28:12 +0000 (10:28 +0900)
[Type]
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: I464ca44e9368bfbc78f6e5a80800ba6e0036c5f7

org.tizen.common/src/org/tizen/common/TizenPlatformConstants.java
org.tizen.common/src/org/tizen/common/util/StringUtil.java

index 2463a98..ffb5271 100644 (file)
@@ -77,4 +77,6 @@ public class TizenPlatformConstants {
     // Definitions for others
     public static final String CODE_COVERAGE_BUILD_OPTION = "-fprofile-arcs -ftest-coverage";
     public static final String CODE_COVERAGE_LAUNCH_OPTION = " __AUL_SDK__ CODE_COVERAGE";
+    public static final String PROCESS_GET_PROCESS_ID_COMMAND = "ps -ef | grep '%s' | grep -v grep | awk '{print $2}'";
+    public static final String PROCESS_SIGKILL_COMMAND = "kill -9 %s";
 }
index 2384a03..ffc409c 100755 (executable)
@@ -1123,4 +1123,16 @@ public class StringUtil
         return result;
     }
 
+    /**
+     * Returns <code>true</code> if the given str is set of integers. Or {@code false} otherwise.
+     * 
+     */
+    public static boolean isInteger(String str) {
+        try {
+            Integer.parseInt(str);
+            return true;
+        } catch (NumberFormatException e) {
+            return false;
+        }
+    }
 }