[Non-ACR][inst.py][Updated inst logic for Inputmethod manual testing] 24/204224/1
authorSanghoon Lee <shooney.lee@samsung.com>
Mon, 22 Apr 2019 07:03:28 +0000 (16:03 +0900)
committerSanghoon Lee <shooney.lee@samsung.com>
Mon, 22 Apr 2019 07:03:28 +0000 (16:03 +0900)
Change-Id: I3ddcc7d469ff46ea379f7e00e793ef5a64663c4b

tool/script/template/inst.py

index ab8dc9d..b6c2afa 100755 (executable)
@@ -190,6 +190,20 @@ def checkPlatformArch(config_key):
                 return True
     return False
 
+def checkProfile():
+    config_key = 'tizen.org/feature/profile'
+    (return_code, output) = doRemoteCMD("cat /etc/config/model-config.xml | grep %s" % (config_key))
+    output_len = len(output)
+
+    #'mobile/wearable/tv'
+    for out in output:
+        if config_key in out:
+            if 'mobile' in out:
+                return 'mobile'
+            elif 'wearable' in out:
+                return 'wearable'
+            elif 'tv' in out:
+                return 'tv'
 
 def instPKGs():
     action_status = True
@@ -263,6 +277,20 @@ def instPKGs():
                     else:
                         print("Skipped installation on this platform. file name is %s" % (file))
 
+                elif file == "org.tizen.example.IMESample.Tizen.Mobile-1.0.0.tpk":
+                    check_profile = checkProfile()
+                    if check_profile != 'wearable':
+                        (return_code, output) = doRemoteCMD("pkgcmd -i -t tpk -q -p %s/%s" % (SRC_DIR, file))
+                    else:
+                        print("Skipped installation on this profile. file name is %s" % (file))
+
+                elif file == "org.tizen.example.IMESample.Tizen.Wearable-1.0.0.tpk":
+                    check_profile = checkProfile()
+                    if check_profile == 'wearable':
+                        (return_code, output) = doRemoteCMD("pkgcmd -i -t tpk -q -p %s/%s" % (SRC_DIR, file))
+                    else:
+                        print("Skipped installation on this profile. file name is %s" % (file))
+
                 else:
                     (return_code, output) = doRemoteCMD(
                         "pkgcmd -i -t tpk -q -p %s/%s" % (SRC_DIR, file))