From: mengli.zhang Date: Tue, 24 Oct 2017 19:46:53 +0000 (-0400) Subject: [common][NFC][Modify inst.wgt.py file] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4d04a6fe80b92bd4fd1d660ab41de2b0330f9ec;p=test%2Ftct%2Fweb%2Fapi.git [common][NFC][Modify inst.wgt.py file] Change-Id: I3ddfa66721581b99a95d20ac165770c57ea0b87c Signed-off-by: mengli.zhang --- diff --git a/common/tct-nfc-tizen-tests/inst.wgt.py b/common/tct-nfc-tizen-tests/inst.wgt.py index 93ac8ad71..2dd4ce674 100755 --- a/common/tct-nfc-tizen-tests/inst.wgt.py +++ b/common/tct-nfc-tizen-tests/inst.wgt.py @@ -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 index 6dbb6c644..000000000 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 index 000000000..6dbb6c644 Binary files /dev/null and b/common/tct-nfc-tizen-tests/nfcTest/org.tizen.tbt_hcetestappa.tpk differ diff --git a/common/tct-nfc-tizen-tests/suite.json b/common/tct-nfc-tizen-tests/suite.json index 7539913ed..c98370d77 100755 --- a/common/tct-nfc-tizen-tests/suite.json +++ b/common/tct-nfc-tizen-tests/suite.json @@ -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": { "sign-flag": "true"