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
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
# 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"
print "No device provided"
sys.exit(1)
+ userCheck()
+
user_info = getUSERID()
re_code = user_info[0]
if re_code == 0 :
--- /dev/null
+/*
+
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+Authors:
+ Wei Ji <wei.ji@samsung.com>
+ */
+
+var APPS_ROOT = "";
+document.write('<script src="jquery-1.10.2.min.js"></script>');
+document.write('<script src="getJsonConf.js"></script>');
\ No newline at end of file
--- /dev/null
+/*\r
+Copyright (c) 2013 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+ Li, Hao <haox.li@intel.com>\r
+\r
+*/\r
+var USER_DIR, APP_DIR_ADMIN, APP_DIR_OTHER, USER_EX, USER_AD;\r
+$.ajax({\r
+ url:"/tmp/TCT_CONFIG",\r
+ data:{},\r
+ async:false,\r
+ success:function(data){\r
+ var regEx = /DEVICE_USER_30=(.+)/i;\r
+ var userE = /DEVICE_EXECUTION_MODE_30=(.+)/i;\r
+ var userA = /DEVICE_ADMIN_USER_30=(.+)/i;\r
+ var AppsRootAd = /DEVICE_ADMIN_USER_APPS_ROOT_30=(.+)/i;\r
+ var AppsRootOt = /DEVICE_OTHER_USER_APPS_ROOT_30=(.+)/i;\r
+ var user = regEx.exec(data);\r
+ var userEXE = userE.exec(data);\r
+ var userEXA = userA.exec(data);\r
+ var AppsRootAdmin = AppsRootAd.exec(data);\r
+ var AppsRootOther = AppsRootOt.exec(data);\r
+ USER_DIR = user[1];\r
+ USER_EX = userEXE[1];\r
+ USER_AD = userEXA[1];\r
+ APP_DIR_ADMIN = AppsRootAdmin[1];\r
+ APP_DIR_OTHER = AppsRootOther[1];\r
+ }\r
+});\r
+if(USER_EX == USER_AD){\r
+APPS_ROOT = APP_DIR_ADMIN;\r
+}\r
+else{\r
+APPS_ROOT = APP_DIR_OTHER;\r
+}
\ No newline at end of file
<meta charset="utf-8">
<script src="resources/testharness.js"></script>
<script src="resources/testharnessreport.js"></script>
+ <script src="ext01_common.js"></script>
</head>
<body>
<div id="log"></div>
assert_equals(img_path.src, excepted);
}, "Check that when set install-location to 'auto', the install location is system defined install location.");*/
test(function() {
- var exceptedPath = "file:///home/owner/apps_rw/wrt2sil051/res/wgt/icon.png";
+ var exceptedPath = "file://" + APPS_ROOT + "/wrt2sil051/res/wgt/icon.png";
function successCB(file){
assert_equals("icon.png", file.name);
}
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
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
# 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"
print "No device provided"
sys.exit(1)
+ userCheck()
+
user_info = getUSERID()
re_code = user_info[0]
if re_code == 0 :
--- /dev/null
+/*
+
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+Authors:
+ Wei Ji <wei.ji@samsung.com>
+ */
+
+var APPS_ROOT = "";
+document.write('<script src="jquery-1.10.2.min.js"></script>');
+document.write('<script src="getJsonConf.js"></script>');
\ No newline at end of file
--- /dev/null
+/*\r
+Copyright (c) 2013 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+ Li, Hao <haox.li@intel.com>\r
+\r
+*/\r
+var USER_DIR, APP_DIR_ADMIN, APP_DIR_OTHER, USER_EX, USER_AD;\r
+$.ajax({\r
+ url:"/tmp/TCT_CONFIG",\r
+ data:{},\r
+ async:false,\r
+ success:function(data){\r
+ var regEx = /DEVICE_USER_30=(.+)/i;\r
+ var userE = /DEVICE_EXECUTION_MODE_30=(.+)/i;\r
+ var userA = /DEVICE_ADMIN_USER_30=(.+)/i;\r
+ var AppsRootAd = /DEVICE_ADMIN_USER_APPS_ROOT_30=(.+)/i;\r
+ var AppsRootOt = /DEVICE_OTHER_USER_APPS_ROOT_30=(.+)/i;\r
+ var user = regEx.exec(data);\r
+ var userEXE = userE.exec(data);\r
+ var userEXA = userA.exec(data);\r
+ var AppsRootAdmin = AppsRootAd.exec(data);\r
+ var AppsRootOther = AppsRootOt.exec(data);\r
+ USER_DIR = user[1];\r
+ USER_EX = userEXE[1];\r
+ USER_AD = userEXA[1];\r
+ APP_DIR_ADMIN = AppsRootAdmin[1];\r
+ APP_DIR_OTHER = AppsRootOther[1];\r
+ }\r
+});\r
+if(USER_EX == USER_AD){\r
+APPS_ROOT = APP_DIR_ADMIN;\r
+}\r
+else{\r
+APPS_ROOT = APP_DIR_OTHER;\r
+}
\ No newline at end of file
<meta charset="utf-8">
<script src="resources/testharness.js"></script>
<script src="resources/testharnessreport.js"></script>
+ <script src="ext01_common.js"></script>
</head>
<body>
<div id="log"></div>
assert_equals(img_path.src, excepted);
}, "Check that when set install-location to 'auto', the install location is system defined install location.");*/
test(function() {
- var exceptedPath = "file:///home/owner/apps_rw/wrt2sil051/res/wgt/icon.png";
+ var exceptedPath = "file://" + APPS_ROOT + "/wrt2sil051/res/wgt/icon.png";
function successCB(file){
assert_equals("icon.png", file.name);
}
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
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
# 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"
print "No device provided"
sys.exit(1)
+ userCheck()
+
user_info = getUSERID()
re_code = user_info[0]
if re_code == 0 :
--- /dev/null
+/*
+
+Copyright (c) 2015 Samsung Electronics Co., Ltd.
+
+Licensed under the Apache License, Version 2.0 (the License);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+
+Authors:
+ Wei Ji <wei.ji@samsung.com>
+ */
+
+var APPS_ROOT = "";
+document.write('<script src="jquery-1.10.2.min.js"></script>');
+document.write('<script src="getJsonConf.js"></script>');
\ No newline at end of file
--- /dev/null
+/*\r
+Copyright (c) 2013 Intel Corporation.\r
+\r
+Redistribution and use in source and binary forms, with or without modification,\r
+are permitted provided that the following conditions are met:\r
+\r
+* Redistributions of works must retain the original copyright notice, this list\r
+ of conditions and the following disclaimer.\r
+* Redistributions in binary form must reproduce the original copyright notice,\r
+ this list of conditions and the following disclaimer in the documentation\r
+ and/or other materials provided with the distribution.\r
+* Neither the name of Intel Corporation nor the names of its contributors\r
+ may be used to endorse or promote products derived from this work without\r
+ specific prior written permission.\r
+\r
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"\r
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+Authors:\r
+ Li, Hao <haox.li@intel.com>\r
+\r
+*/\r
+var USER_DIR, APP_DIR_ADMIN, APP_DIR_OTHER, USER_EX, USER_AD;\r
+$.ajax({\r
+ url:"/tmp/TCT_CONFIG",\r
+ data:{},\r
+ async:false,\r
+ success:function(data){\r
+ var regEx = /DEVICE_USER_30=(.+)/i;\r
+ var userE = /DEVICE_EXECUTION_MODE_30=(.+)/i;\r
+ var userA = /DEVICE_ADMIN_USER_30=(.+)/i;\r
+ var AppsRootAd = /DEVICE_ADMIN_USER_APPS_ROOT_30=(.+)/i;\r
+ var AppsRootOt = /DEVICE_OTHER_USER_APPS_ROOT_30=(.+)/i;\r
+ var user = regEx.exec(data);\r
+ var userEXE = userE.exec(data);\r
+ var userEXA = userA.exec(data);\r
+ var AppsRootAdmin = AppsRootAd.exec(data);\r
+ var AppsRootOther = AppsRootOt.exec(data);\r
+ USER_DIR = user[1];\r
+ USER_EX = userEXE[1];\r
+ USER_AD = userEXA[1];\r
+ APP_DIR_ADMIN = AppsRootAdmin[1];\r
+ APP_DIR_OTHER = AppsRootOther[1];\r
+ }\r
+});\r
+if(USER_EX == USER_AD){\r
+APPS_ROOT = APP_DIR_ADMIN;\r
+}\r
+else{\r
+APPS_ROOT = APP_DIR_OTHER;\r
+}
\ No newline at end of file
<meta charset="utf-8">
<script src="resources/testharness.js"></script>
<script src="resources/testharnessreport.js"></script>
+ <script src="ext01_common.js"></script>
</head>
<body>
<div id="log"></div>
assert_equals(img_path.src, excepted);
}, "Check that when set install-location to 'auto', the install location is system defined install location.");*/
test(function() {
- var exceptedPath = "file:///home/owner/apps_rw/wrt2sil051/res/wgt/icon.png";
+ var exceptedPath = "file://" + APPS_ROOT + "/wrt2sil051/res/wgt/icon.png";
function successCB(file){
assert_equals("icon.png", file.name);
}