From: wei.ji Date: Fri, 20 Jan 2017 03:07:55 +0000 (+0800) Subject: [common][canvas][change path for supporting global user and annotate 2 TCs] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F28%2F111228%2F1;p=test%2Ftct%2Fweb%2Fapi.git [common][canvas][change path for supporting global user and annotate 2 TCs] - annotate 2 TCs in tests.xml - change path for supporting global user in inst.wgt.py Change-Id: I9a73ed0362b6743d08204fa09d77c6f823f04ccd Signed-off-by: wei.ji --- diff --git a/common/tct-canvas-html5-tests/inst.wgt.py b/common/tct-canvas-html5-tests/inst.wgt.py old mode 100644 new mode 100755 index e735a701d..84a331b62 --- a/common/tct-canvas-html5-tests/inst.wgt.py +++ b/common/tct-canvas-html5-tests/inst.wgt.py @@ -7,7 +7,7 @@ import time import sys import subprocess import string -from optparse import OptionParser, make_option +from optparse import OptionParser, make_option import ConfigParser @@ -20,6 +20,15 @@ tct_parser = ConfigParser.ConfigParser() tct_parser.read(TCT_CONFIG_FILE) SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30') PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME) +EXECUTION_MODE_30 = tct_parser.get('DEVICE', 'DEVICE_EXECUTION_MODE_30') +ADMIN_USER_30 = tct_parser.get('DEVICE', 'DEVICE_ADMIN_USER_30') + +def userCheck(): + global GLOVAL_OPT + if ADMIN_USER_30 == EXECUTION_MODE_30: + GLOVAL_OPT="--global" + else: + GLOVAL_OPT="" def doCMD(cmd): @@ -55,8 +64,6 @@ def getUSERID(): return doCMD(cmd) - - def getPKGID(pkg_name=None): if PARAMETERS.mode == "SDB": cmd = "sdb -s %s shell %s" % ( @@ -106,6 +113,9 @@ def doRemoteCopy(src=None, dest=None): def uninstPKGs(): action_status = True for root, dirs, files in os.walk(SCRIPT_DIR): + if root.endswith("mediasrc"): + continue + for file in files: if file.endswith(".wgt"): pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0])) @@ -113,7 +123,7 @@ def uninstPKGs(): action_status = False continue (return_code, output) = doRemoteCMD( - "pkgcmd -u -t wgt -q -n %s" % pkg_id) + "pkgcmd %s -q -u -n %s" % (GLOVAL_OPT, pkg_id)) for line in output: if "Failure" in line: action_status = False @@ -134,12 +144,15 @@ def instPKGs(): if return_code != 0: action_status = False for root, dirs, files in os.walk(SCRIPT_DIR): + if root.endswith("mediasrc"): + continue + for file in files: if file.endswith(".wgt"): if not doRemoteCopy(os.path.join(root, file), "%s/%s" % (SRC_DIR, file)): action_status = False (return_code, output) = doRemoteCMD( - "pkgcmd -i -t wgt -q -p %s/%s" % (SRC_DIR, file)) + "pkgcmd %s -i -t wgt -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: @@ -181,7 +194,7 @@ def main(): sys.exit(1) if not PARAMETERS.user: - PARAMETERS.user = "owner" + PARAMETERS.user = EXECUTION_MODE_30 if not PARAMETERS.mode: PARAMETERS.mode = "SDB" @@ -198,7 +211,9 @@ def main(): if not PARAMETERS.device: print "No device provided" sys.exit(1) - + + userCheck() + user_info = getUSERID() re_code = user_info[0] if re_code == 0 : diff --git a/common/tct-canvas-html5-tests/tests.xml b/common/tct-canvas-html5-tests/tests.xml old mode 100644 new mode 100755 index 247b9135f..fb9af5d41 --- a/common/tct-canvas-html5-tests/tests.xml +++ b/common/tct-canvas-html5-tests/tests.xml @@ -1332,11 +1332,11 @@ /opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve1.html - + /opt/tct-canvas-html5-tests/canvas/w3c/security.pattern.create.sub.html @@ -4667,11 +4667,11 @@ /opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.emptysrc.html - + /opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.reload.html