[common][NFC][Modify inst.wgt.py file] 33/157333/1
authormengli.zhang <mengli.zhang@samsung.com>
Tue, 24 Oct 2017 19:46:53 +0000 (15:46 -0400)
committermengli.zhang <mengli.zhang@samsung.com>
Tue, 24 Oct 2017 19:47:04 +0000 (15:47 -0400)
Change-Id: I3ddfa66721581b99a95d20ac165770c57ea0b87c
Signed-off-by: mengli.zhang <mengli.zhang@samsung.com>
common/tct-nfc-tizen-tests/inst.wgt.py
common/tct-nfc-tizen-tests/nfcTest/org.tizen.tbt_hcetestappa-1.0.0-arm.tpk [deleted file]
common/tct-nfc-tizen-tests/nfcTest/org.tizen.tbt_hcetestappa.tpk [new file with mode: 0755]
common/tct-nfc-tizen-tests/suite.json

index 93ac8ad714963bd2c8c224982d78ae0ac055b042..2dd4ce674b3eb0d5cb1c1efafbdd2ca5f564ab2a 100755 (executable)
@@ -118,13 +118,13 @@ def uninstPKGs():
             continue
 
         for file in files:
-            if file.endswith(".wgt"):
+            if file.endswith(".wgt") or file.endswith(".tpk"):
                 pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
                 if not pkg_id:
                     action_status = False
                     continue
                 (return_code, output) = doRemoteCMD(
-                    "pkgcmd %s -u -t wgt -q -n %s" % (GLOVAL_OPT, pkg_id))
+                    "pkgcmd %s -q -u -n %s" % (GLOVAL_OPT, pkg_id))
                 for line in output:
                     if "Failure" in line:
                         action_status = False
@@ -132,6 +132,10 @@ def uninstPKGs():
 
     (return_code, output) = doRemoteCMD(
         "rm -rf %s" % PKG_SRC_DIR)
+    #(return_code, output) = doRemoteCMD(
+     #   "rm /home/owner/share/org.tizen.tbt_hcetestappa-1.0.0-arm.tpk")
+   # (return_code, output) = doRemoteCMD(
+    #    "rm /home/owner/share/nfcTest.wgt")
     if return_code != 0:
         action_status = False
 
@@ -159,18 +163,23 @@ def instPKGs():
                     if "Failure" in line:
                         action_status = False
                         break
+        for file in files:
+            if file.endswith(".tpk"):
+                if not doRemoteCopy(os.path.join(root, file), "%s/%s" % (SRC_DIR, file)):
+                    action_status = False
+                (return_code, output) = doRemoteCMD(
+                    "pkgcmd %s -i -t tpk -q -p %s/%s" % (GLOVAL_OPT, SRC_DIR, file))
+                doRemoteCMD("rm -rf %s/%s" % (SRC_DIR, file))
+                for line in output:
+                    if "Failure" in line:
+                        action_status = False
+                        break
 
     # Do some special copy/delete... steps
-    '''
-    (return_code, output) = doRemoteCMD(
-        "mkdir -p %s/tests" % PKG_SRC_DIR)
-    if return_code != 0:
-        action_status = False
-
-    if not doRemoteCopy("specname/tests", "%s/tests" % PKG_SRC_DIR):
-        action_status = False
-    '''
-
+    #if not doRemoteCopy(os.path.join(SCRIPT_DIR, "nfcTest"), "/home/owner/share"):
+     #   action_status = False
+    #(return_code, output) = doRemoteCMD(
+     #   "su - %s -c '%s;app_launcher -s cM2gZdtzOg.nfcTest'" % (PARAMETERS.user, XW_ENV))
     return action_status
 
 
diff --git a/common/tct-nfc-tizen-tests/nfcTest/org.tizen.tbt_hcetestappa-1.0.0-arm.tpk b/common/tct-nfc-tizen-tests/nfcTest/org.tizen.tbt_hcetestappa-1.0.0-arm.tpk
deleted file mode 100755 (executable)
index 6dbb6c6..0000000
Binary files a/common/tct-nfc-tizen-tests/nfcTest/org.tizen.tbt_hcetestappa-1.0.0-arm.tpk and /dev/null differ
diff --git a/common/tct-nfc-tizen-tests/nfcTest/org.tizen.tbt_hcetestappa.tpk b/common/tct-nfc-tizen-tests/nfcTest/org.tizen.tbt_hcetestappa.tpk
new file mode 100755 (executable)
index 0000000..6dbb6c6
Binary files /dev/null and b/common/tct-nfc-tizen-tests/nfcTest/org.tizen.tbt_hcetestappa.tpk differ
index 7539913eda7dd8c3c247034389c773f1c925552c..c98370d77d5f475f4e4f9b8d319ac1bbcd2fdec2 100755 (executable)
@@ -34,7 +34,9 @@
             "copylist": {
                 "inst.wgt.py": "inst.py",
                 "tests.full.xml": "tests.full.xml",
-                "tests.xml": "tests.xml"
+                "tests.xml": "tests.xml",
+                "nfcTest/nfcTest.wgt"  : "nfcTest.wgt",
+                "nfcTest/org.tizen.tbt_hcetestappa.tpk"  : "org.tizen.tbt_hcetestappa.tpk"
             },
             "pkg-app": {\r
                 "sign-flag": "true"\r