From: xy.qian Date: Fri, 20 Jan 2017 02:15:47 +0000 (+0800) Subject: [mobile][tct-application-tizen-tests][change path for supporting global user] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c080a8a333c3e370e22006f59426724e23bfc8cd;p=test%2Ftct%2Fweb%2Fapi.git [mobile][tct-application-tizen-tests][change path for supporting global user] Change-Id: I55be1a21fa7449d992fb17fad64b38e0260d0f31 Signed-off-by: xy.qian --- diff --git a/mobile/tct-application-tizen-tests/inst.wgt.py b/mobile/tct-application-tizen-tests/inst.wgt.py index cd0fc5e56..9e0c931c3 100644 --- a/mobile/tct-application-tizen-tests/inst.wgt.py +++ b/mobile/tct-application-tizen-tests/inst.wgt.py @@ -20,7 +20,16 @@ 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): # Do not need handle timeout in this short script, let tool do it @@ -117,7 +126,7 @@ def uninstPKGs(): action_status = False continue (return_code, output) = doRemoteCMD( - "pkgcmd -u -t wgt -q -n %s" % pkg_id) + "pkgcmd %s -u -t wgt -q -n %s" % (GLOVAL_OPT, pkg_id)) for line in output: if "Failure" in line: action_status = False @@ -151,7 +160,7 @@ def instPKGs(): 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: @@ -186,7 +195,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" @@ -204,6 +213,8 @@ def main(): print "No device provided" sys.exit(1) + userCheck() + user_info = getUSERID() re_code = user_info[0] if re_code == 0 : diff --git a/mobile/tct-application-tizen-tests/tests.full.xml b/mobile/tct-application-tizen-tests/tests.full.xml index 9b9066f6d..da4a8f2ae 100644 --- a/mobile/tct-application-tizen-tests/tests.full.xml +++ b/mobile/tct-application-tizen-tests/tests.full.xml @@ -368,7 +368,7 @@ Make sure that TCTAppInfoEventTest1 application is not installed (uninstall it) - Click run and install TCTAppInfoEventTest1.wgt application using command "pkgcmd –i –t wgt -q –p /home/owner/share/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt". + Click run and install TCTAppInfoEventTest1.wgt application using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt". Pass @@ -384,7 +384,7 @@ - Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p /home/owner/share/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt"). + Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt"). Click run and uninstall TCTAppInfoEventTest1 application. @@ -403,10 +403,10 @@ - Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p /home/owner/share/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt"). + Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt"). - Click run and install TCTAppInfoEventTest2.wgt application using command "pkgcmd –i –t wgt -q –p /home/owner/share/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest2.wgt". + Click run and install TCTAppInfoEventTest2.wgt application using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest2.wgt". Pass @@ -617,7 +617,7 @@ Make sure that TCTAppInfoEventTest1 application is not installed (uninstall it) - Click run and install TCTAppInfoEventTest1.wgt application using command "pkgcmd –i –t wgt -q –p /home/owner/share/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt". + Click run and install TCTAppInfoEventTest1.wgt application using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt". Pass @@ -633,7 +633,7 @@ - Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p /home/owner/share/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt"). + Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt"). Click run and uninstall TCTAppInfoEventTest1 application. @@ -652,10 +652,10 @@ - Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p /home/owner/share/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt"). + Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest1.wgt"). - Click run and install TCTAppInfoEventTest2.wgt application using command "pkgcmd –i –t wgt -q –p /home/owner/share/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest2.wgt". + Click run and install TCTAppInfoEventTest2.wgt application using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/tct/opt/tct-application-tizen-tests/mediasrc/TCTAppInfoEventTest2.wgt". Pass diff --git a/mobile/tct-application-tizen-tests/tests.xml b/mobile/tct-application-tizen-tests/tests.xml index 5046ac245..2f565f724 100644 --- a/mobile/tct-application-tizen-tests/tests.xml +++ b/mobile/tct-application-tizen-tests/tests.xml @@ -158,7 +158,7 @@ Make sure that TCTAppInfoEventTest1 application is not installed (uninstall it) - Click run and install TCTAppInfoEventTest1.wgt application using command "pkgcmd –i –t wgt -q –p /home/owner/share/Others/TCTAppInfoEventTest1.wgt". + Click run and install TCTAppInfoEventTest1.wgt application using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/Others/TCTAppInfoEventTest1.wgt". Pass @@ -167,7 +167,7 @@ - Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p /home/owner/share/Others/TCTAppInfoEventTest1.wgt"). + Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/Others/TCTAppInfoEventTest1.wgt"). Click run and uninstall TCTAppInfoEventTest1 application. @@ -179,10 +179,10 @@ - Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p /home/owner/share/Others/TCTAppInfoEventTest1.wgt"). + Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/Others/TCTAppInfoEventTest1.wgt"). - Click run and install TCTAppInfoEventTest2.wgt application using command "pkgcmd –i –t wgt -q –p /home/owner/share/Others/TCTAppInfoEventTest2.wgt". + Click run and install TCTAppInfoEventTest2.wgt application using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/Others/TCTAppInfoEventTest2.wgt". Pass @@ -274,7 +274,7 @@ Make sure that TCTAppInfoEventTest1 application is not installed (uninstall it) - Click run and install TCTAppInfoEventTest1.wgt application using command "pkgcmd –i –t wgt -q –p /home/owner/share/Others/TCTAppInfoEventTest1.wgt". + Click run and install TCTAppInfoEventTest1.wgt application using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/Others/TCTAppInfoEventTest1.wgt". Pass @@ -283,7 +283,7 @@ - Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p /home/owner/share/Others/TCTAppInfoEventTest1.wgt"). + Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/Others/TCTAppInfoEventTest1.wgt"). Click run and uninstall TCTAppInfoEventTest1 application. @@ -295,10 +295,10 @@ - Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p /home/owner/share/Others/TCTAppInfoEventTest1.wgt"). + Make sure that TCTAppInfoEventTest1 application is installed (you can install it using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/Others/TCTAppInfoEventTest1.wgt"). - Click run and install TCTAppInfoEventTest2.wgt application using command "pkgcmd –i –t wgt -q –p /home/owner/share/Others/TCTAppInfoEventTest2.wgt". + Click run and install TCTAppInfoEventTest2.wgt application using command "pkgcmd –i –t wgt -q –p {DEVICE_SUITE_TARGET_30}/Others/TCTAppInfoEventTest2.wgt". Pass