import sys
import subprocess
import string
-from optparse import OptionParser, make_option\r
+from optparse import OptionParser, make_option
import 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):
return doCMD(cmd)
-
-
def getPKGID(pkg_name=None):
if PARAMETERS.mode == "SDB":
cmd = "sdb -s %s shell %s" % (
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]))
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
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:
sys.exit(1)
if not PARAMETERS.user:
- PARAMETERS.user = "owner"
+ PARAMETERS.user = EXECUTION_MODE_30
if not PARAMETERS.mode:
PARAMETERS.mode = "SDB"
if not PARAMETERS.device:
print "No device provided"
sys.exit(1)
-
+
+ userCheck()
+
user_info = getUSERID()
re_code = user_info[0]
if re_code == 0 :
<test_script_entry test_script_expected_result="actual output is the same with expected result, check if it's acceptable with your eyes.">/opt/tct-canvas-html5-tests/canvas/w3c/2d.path.arcTo.shape.curve1.html</test_script_entry>
</description>
</testcase>
- <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="security.pattern.canvas.timing.sub" purpose="Pattern safety depends on whether the source was origin-clean, not on whether it still is clean">
+ <!--testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="security.pattern.canvas.timing.sub" purpose="Pattern safety depends on whether the source was origin-clean, not on whether it still is clean">
<description>
<test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/security.pattern.canvas.timing.sub.html</test_script_entry>
</description>
- </testcase>
+ </testcase-->
<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="security.pattern.create.sub" purpose="Creating an unclean pattern does not make the canvas origin-unclean">
<description>
<test_script_entry test_script_expected_result="0">/opt/tct-canvas-html5-tests/canvas/w3c/security.pattern.create.sub.html</test_script_entry>
<test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.emptysrc.html</test_script_entry>
</description>
</testcase>
- <testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.incomplete.nosrc" purpose="Check the drawImage method with image is no src">
+ <!--testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.incomplete.nosrc" purpose="Check the drawImage method with image is no src">
<description>
<test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.nosrc.html</test_script_entry>
</description>
- </testcase>
+ </testcase-->
<testcase component="W3C_HTML5 APIs/Graphics/HTML5 The canvas element (Partial)" execution_type="auto" id="2d.drawImage.incomplete.reload" purpose="Check the drawImage method with image is reload">
<description>
<test_script_entry>/opt/tct-canvas-html5-tests/canvas/w3c/2d.drawImage.incomplete.reload.html</test_script_entry>