[common][mediaqueries][Change path for supporting global user] 82/111282/1
authormengli.zhang <mengli.zhang@samsung.com>
Fri, 20 Jan 2017 17:43:16 +0000 (12:43 -0500)
committermengli.zhang <mengli.zhang@samsung.com>
Fri, 20 Jan 2017 17:43:21 +0000 (12:43 -0500)
Change-Id: I556064baf36e03d09ad1e8bee4156f560aa55077
Signed-off-by: mengli.zhang <mengli.zhang@samsung.com>
common/tct-mediaqueries-css3-tests/inst.wgt.py
common/tct-mediaqueries-css3-tests/tests.full.xml
common/tct-mediaqueries-css3-tests/tests.xml

index 5b1718da169ebc796a16962b47a209f160af24d9..93ac8ad714963bd2c8c224982d78ae0ac055b042 100755 (executable)
@@ -20,7 +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):
     # Do not need handle timeout in this short script, let tool do it
@@ -116,7 +124,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
@@ -145,7 +153,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:
@@ -187,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"
 
@@ -205,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 :
index 7cf1776a5c44ee08122f193ef2ca1333f49d7e80..9e91ffa09828a1d591880a2d428850eacf4357c4 100755 (executable)
           </spec>
         </specs>
       </testcase>
-      <testcase component="W3C_HTML5 APIs/DOM, Forms and Styles/Media Queries (Partial)" execution_type="auto" id="CSS3MQ_resolution_max" priority="P3" purpose="When your output device is set max-resolution, the Bank text is displayed in red" status="approved" type="compliance">
+      <!--<testcase component="W3C_HTML5 APIs/DOM, Forms and Styles/Media Queries (Partial)" execution_type="auto" id="CSS3MQ_resolution_max" priority="P3" purpose="When your output device is set max-resolution, the Bank text is displayed in red" status="approved" type="compliance">
         <description>
           <test_script_entry>/opt/tct-mediaqueries-css3-tests/mediaqueries/CSS3MQ_resolution_max.html</test_script_entry>
         </description>
             <spec_statement />
           </spec>
         </specs>
-      </testcase>
+      </testcase> -->
       <testcase component="W3C_HTML5 APIs/DOM, Forms and Styles/Media Queries (Partial)" execution_type="auto" id="CSS3MQ_resolution" priority="P3" purpose="When your output device is set resolution, the Bank text is displayed in red" status="approved" type="compliance">
         <description>
           <test_script_entry>/opt/tct-mediaqueries-css3-tests/mediaqueries/CSS3MQ_resolution.html</test_script_entry>
index f6bbcfa94cecea487be1cf753842603bc815d00a..dbf486bb2b52cd7fa9dd4a4722f94301c1af5dd0 100755 (executable)
           <test_script_entry>/opt/tct-mediaqueries-css3-tests/mediaqueries/CSS3MQ_monochrome_min_1.html</test_script_entry>
         </description>
       </testcase>
-      <testcase component="W3C_HTML5 APIs/DOM, Forms and Styles/Media Queries (Partial)" execution_type="auto" id="CSS3MQ_resolution_max" purpose="When your output device is set max-resolution, the Bank text is displayed in red">
+      <!--<testcase component="W3C_HTML5 APIs/DOM, Forms and Styles/Media Queries (Partial)" execution_type="auto" id="CSS3MQ_resolution_max" purpose="When your output device is set max-resolution, the Bank text is displayed in red">
         <description>
           <test_script_entry>/opt/tct-mediaqueries-css3-tests/mediaqueries/CSS3MQ_resolution_max.html</test_script_entry>
         </description>
-      </testcase>
+      </testcase> -->
       <testcase component="W3C_HTML5 APIs/DOM, Forms and Styles/Media Queries (Partial)" execution_type="auto" id="CSS3MQ_resolution" purpose="When your output device is set resolution, the Bank text is displayed in red">
         <description>
           <test_script_entry>/opt/tct-mediaqueries-css3-tests/mediaqueries/CSS3MQ_resolution.html</test_script_entry>