--- /dev/null
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+## Introduction
+
+This test suite is for config extension module testing
+
+## Authors:
+
+* Yue, Jianhui <jianhuix.a.yue@intel.com>
+
+## LICENSE
+
+Copyright (c) 2013 Intel Corporation.
+Except as noted, this software is licensed under BSD-3-Clause License.
+Please see the COPYING file for the BSD-3-Clause License.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget id="http://tizen.org/application-id-exist" xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" version='3.0'>
+ <access origin="*"/>
+ <icon src="icon.png" height="117" width="117"/>
+ <content src="index.html"/>
+ <name>application-id-exist</name>
+ <tizen:application id="wrt2app003.ApplicationIdExist" package="wrt2app003" required_version="3.0"/>
+ <tizen:setting screen-orientation="landscape" contextmenu="disable"/>
+</widget>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Yue, Jianhui <jianhuix.a.yue@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>WRT Test: application-id-exist</title>
+ <link rel="author" title="Intel" href="http://www.intel.com"/>
+ <link rel="help" href=""/>
+ <meta name="flags" content=""/>
+ <meta name="assert" content="Check that the web runtime be able to identify the valid application id."/>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <p>1. Install application-id-exist.wgt<br>Expected: widget application is able to install successfully<br>2. Confirm the widget application id<br>Expected: the "Package Name" can show normally</p>
+ </body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget id="http://tizen.org/application-required-version-support" xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" version='3.0'>
+ <access origin="*"/>
+ <icon src="icon.png" height="117" width="117"/>
+ <content src="index.html"/>
+ <name>application-required-version-support</name>
+ <tizen:application id="wrt2aev007.ApplicationRequiredVersionSupport" package="wrt2aev007" required_version="3.0"/>
+</widget>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Yue, Jianhui <jianhuix.a.yue@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>WRT Test: application-required-version-support</title>
+ <link rel="author" title="Intel" href="http://www.intel.com"/>
+ <link rel="help" href=""/>
+ <meta name="flags" content=""/>
+ <meta name="assert" content="Check that the web runtime can install the app which has a valid  required version successfully."/>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <p>1.Install application-required-version-support.wgt<br>Expected: widget application is able to install successfully<br>2.Confirm the widget application work properly in support version.<br>Expected: the widget application can work properly</p>
+ </body>
+</html>
--- /dev/null
+support
+w3c
--- /dev/null
+#!/usr/bin/env python
+
+import os
+import shutil
+import glob
+import time
+import sys
+import subprocess
+from optparse import OptionParser, make_option\r
+import ConfigParser
+
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+PARAMETERS = None
+ADB_CMD = "adb"
+
+
+def doCMD(cmd):
+ # Do not need handle timeout in this short script, let tool do it
+ print "-->> \"%s\"" % cmd
+ output = []
+ cmd_return_code = 1
+ cmd_proc = subprocess.Popen(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+
+ while True:
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
+ cmd_return_code = cmd_proc.poll()
+ if output_line == '' and cmd_return_code != None:
+ break
+ sys.stdout.write("%s\n" % output_line)
+ sys.stdout.flush()
+ output.append(output_line)
+
+ return (cmd_return_code, output)
+
+
+def uninstPKGs():
+ action_status = True
+ for root, dirs, files in os.walk(SCRIPT_DIR):
+ for file in files:
+ if file.endswith(".apk"):
+ cmd = "%s -s %s uninstall org.xwalk.%s" % (
+ ADB_CMD, PARAMETERS.device, os.path.basename(os.path.splitext(file)[0]))
+ (return_code, output) = doCMD(cmd)
+ for line in output:
+ if "Failure" in line:
+ action_status = False
+ break
+ return action_status
+
+
+def instPKGs():
+ action_status = True
+ for root, dirs, files in os.walk(SCRIPT_DIR):
+ for file in files:
+ if file.endswith(".apk"):
+ cmd = "%s -s %s install %s" % (ADB_CMD,
+ PARAMETERS.device, os.path.join(root, file))
+ (return_code, output) = doCMD(cmd)
+ for line in output:
+ if "Failure" in line:
+ action_status = False
+ break
+ return action_status
+
+
+def main():
+ try:
+ usage = "usage: inst.py -i"
+ opts_parser = OptionParser(usage=usage)
+ opts_parser.add_option(
+ "-s", dest="device", action="store", help="Specify device")
+ opts_parser.add_option(
+ "-i", dest="binstpkg", action="store_true", help="Install package")
+ opts_parser.add_option(
+ "-u", dest="buninstpkg", action="store_true", help="Uninstall package")
+ global PARAMETERS
+ (PARAMETERS, args) = opts_parser.parse_args()
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
+ sys.exit(1)
+
+ if not PARAMETERS.device:
+ (return_code, output) = doCMD("adb devices")
+ for line in output:
+ if str.find(line, "\tdevice") != -1:
+ PARAMETERS.device = line.split("\t")[0]
+ break
+
+ if not PARAMETERS.device:
+ print "No device found"
+ sys.exit(1)
+
+ if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
+ print "-i and -u are conflict"
+ sys.exit(1)
+
+ if PARAMETERS.buninstpkg:
+ if not uninstPKGs():
+ sys.exit(1)
+ else:
+ if not instPKGs():
+ sys.exit(1)
+
+if __name__ == "__main__":
+ main()
+ sys.exit(0)
--- /dev/null
+#!/usr/bin/env python
+
+import os
+import shutil
+import glob
+import time
+import sys
+import subprocess
+import string
+from optparse import OptionParser, make_option\r
+import ConfigParser
+
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+PKG_NAME = os.path.basename(SCRIPT_DIR)
+PARAMETERS = None
+#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
+TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
+tct_parser = ConfigParser.ConfigParser()
+tct_parser.read(TCT_CONFIG_FILE)
+SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
+USER_DIR = tct_parser.get('DEVICE', 'DEVICE_USER_30')
+PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
+
+
+def doCMD(cmd):
+ # Do not need handle timeout in this short script, let tool do it
+ print "-->> \"%s\"" % cmd
+ output = []
+ cmd_return_code = 1
+ cmd_proc = subprocess.Popen(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+
+ while True:
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
+ cmd_return_code = cmd_proc.poll()
+ if output_line == '' and cmd_return_code != None:
+ break
+ sys.stdout.write("%s\n" % output_line)
+ sys.stdout.flush()
+ output.append(output_line)
+
+ return (cmd_return_code, output)
+
+def updateCMD(cmd=None):
+ if "pkgcmd" in cmd:
+ cmd = "su - %s -c '%s;%s'" % (PARAMETERS.user, XW_ENV, cmd)
+ return cmd
+def getUSERID():
+ if PARAMETERS.mode == "SDB":
+ cmd = "sdb -s %s shell id -u %s" % (
+ PARAMETERS.device, PARAMETERS.user)
+ else:
+ cmd = "ssh %s \"id -u %s\"" % (
+ PARAMETERS.device, PARAMETERS.user )
+ return doCMD(cmd)
+
+
+def getPKGID(pkg_name=None):
+ if PARAMETERS.mode == "SDB":
+ cmd = "sdb -s %s shell %s" % (
+ PARAMETERS.device, updateCMD('pkgcmd -l'))
+ else:
+ cmd = "ssh %s \"%s\"" % (
+ PARAMETERS.device, updateCMD('pkgcmd -l'))
+
+ (return_code, output) = doCMD(cmd)
+ if return_code != 0:
+ return None
+
+ test_pkg_id = None
+ for line in output:
+ if line.find("[" + pkg_name + "]") != -1:
+ pkgidIndex = line.split().index("pkgid")
+ test_pkg_id = line.split()[pkgidIndex+1].strip("[]")
+ break
+ return test_pkg_id
+
+
+def doRemoteCMD(cmd=None):
+ if PARAMETERS.mode == "SDB":
+ cmd = "sdb -s %s shell %s" % (PARAMETERS.device, updateCMD(cmd))
+ else:
+ cmd = "ssh %s \"%s\"" % (PARAMETERS.device, updateCMD(cmd))
+
+ return doCMD(cmd)
+
+
+def doRemoteCopy(src=None, dest=None):
+ if PARAMETERS.mode == "SDB":
+ cmd_prefix = "sdb -s %s push" % PARAMETERS.device
+ cmd = "%s %s %s" % (cmd_prefix, src, dest)
+ else:
+ cmd = "scp -r %s %s:/%s" % (src, PARAMETERS.device, dest)
+
+ (return_code, output) = doCMD(cmd)
+ doRemoteCMD("sync")
+
+ if return_code != 0:
+ return True
+ else:
+ return False
+
+
+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]))
+ if not pkg_id:
+ action_status = False
+ continue
+ (return_code, output) = doRemoteCMD(
+ "pkgcmd -u -t wgt -q -n %s" % pkg_id)
+ for line in output:
+ if "Failure" in line:
+ action_status = False
+ break
+
+ (return_code, output) = doRemoteCMD(
+ "rm -rf %s" % PKG_SRC_DIR)
+ if return_code != 0:
+ action_status = False
+
+ return action_status
+
+
+def instPKGs():
+ action_status = True
+ (return_code, output) = doRemoteCMD(
+ "mkdir -p %s" % PKG_SRC_DIR)
+ 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("%s.wgt" % PKG_NAME):
+# 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))
+# doRemoteCMD("rm -rf %s/%s" % (SRC_DIR, file))
+# for line in output:
+# if "Failure" in line:
+# action_status = False
+# break
+
+ # Do some special copy/delete... steps
+ '''
+ (return_code, output) = doRemoteCMD(
+ "mkdir -p %s/tests" % PKG_SRC_DIR)
+ if return_code != 0:
+ action_status = False
+
+ if not doRemoteCopy("specname/tests", "%s/tests" % PKG_SRC_DIR):
+ action_status = False
+ '''
+ for item in glob.glob("%s/*" % SCRIPT_DIR):
+ if item.endswith("inst.py"):
+ continue
+ else:
+ item_name = os.path.basename(item)
+ if not doRemoteCopy(item, "%s/%s" % (PKG_SRC_DIR, item_name)):
+ action_status = False
+ (return_code, output) = doRemoteCMD("chmod 777 %s/content/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller" % USER_DIR)
+ return action_status
+
+
+def main():
+ try:
+ usage = "usage: inst.py -i"
+ opts_parser = OptionParser(usage=usage)
+ opts_parser.add_option(
+ "-m", dest="mode", action="store", help="Specify mode")
+ opts_parser.add_option(
+ "-s", dest="device", action="store", help="Specify device")
+ opts_parser.add_option(
+ "-i", dest="binstpkg", action="store_true", help="Install package")
+ opts_parser.add_option(
+ "-u", dest="buninstpkg", action="store_true", help="Uninstall package")
+ opts_parser.add_option(
+ "-a", dest="user", action="store", help="User name")
+ global PARAMETERS
+ (PARAMETERS, args) = opts_parser.parse_args()
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
+ sys.exit(1)
+
+ if not PARAMETERS.user:
+ PARAMETERS.user = "owner"
+ if not PARAMETERS.mode:
+ PARAMETERS.mode = "SDB"
+
+ if PARAMETERS.mode == "SDB":
+ if not PARAMETERS.device:
+ (return_code, output) = doCMD("sdb devices")
+ for line in output:
+ if str.find(line, "\tdevice") != -1:
+ PARAMETERS.device = line.split("\t")[0]
+ break
+ else:
+ PARAMETERS.mode = "SSH"
+
+ if not PARAMETERS.device:
+ print "No device provided"
+ sys.exit(1)
+
+ user_info = getUSERID()
+ re_code = user_info[0]
+ if re_code == 0 :
+ global XW_ENV
+ userid = user_info[1][0]
+ XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
+ else:
+ print "[Error] cmd commands error : %s"%str(user_info[1])
+ sys.exit(1)
+ if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
+ print "-i and -u are conflict"
+ sys.exit(1)
+
+ if PARAMETERS.buninstpkg:
+ if not uninstPKGs():
+ sys.exit(1)
+ else:
+ if not instPKGs():
+ sys.exit(1)
+
+if __name__ == "__main__":
+ main()
+ sys.exit(0)
--- /dev/null
+#!/usr/bin/env python
+
+import os
+import shutil
+import glob
+import time
+import sys
+import subprocess
+import string
+from optparse import OptionParser, make_option\r
+import ConfigParser
+
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+PKG_NAME = os.path.basename(SCRIPT_DIR)
+PARAMETERS = None
+#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
+TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
+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)
+
+
+def doCMD(cmd):
+ # Do not need handle timeout in this short script, let tool do it
+ print "-->> \"%s\"" % cmd
+ output = []
+ cmd_return_code = 1
+ cmd_proc = subprocess.Popen(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+
+ while True:
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
+ cmd_return_code = cmd_proc.poll()
+ if output_line == '' and cmd_return_code != None:
+ break
+ sys.stdout.write("%s\n" % output_line)
+ sys.stdout.flush()
+ output.append(output_line)
+
+ return (cmd_return_code, output)
+
+
+def updateCMD(cmd=None):
+ if "pkgcmd" in cmd:
+ cmd = "su - %s -c '%s;%s'" % (PARAMETERS.user, XW_ENV, cmd)
+ return cmd
+def getUSERID():
+ if PARAMETERS.mode == "SDB":
+ cmd = "sdb -s %s shell id -u %s" % (
+ PARAMETERS.device, PARAMETERS.user)
+ else:
+ cmd = "ssh %s \"id -u %s\"" % (
+ PARAMETERS.device, PARAMETERS.user )
+ return doCMD(cmd)
+
+
+def getPKGID(pkg_name=None):
+ if PARAMETERS.mode == "SDB":
+ cmd = "sdb -s %s shell %s" % (
+ PARAMETERS.device, updateCMD('pkgcmd -l'))
+ else:
+ cmd = "ssh %s \"%s\"" % (
+ PARAMETERS.device, updateCMD('pkgcmd -l'))
+
+ (return_code, output) = doCMD(cmd)
+ if return_code != 0:
+ return None
+
+ test_pkg_id = None
+ for line in output:
+ if line.find("[" + pkg_name + "]") != -1:
+ pkgidIndex = line.split().index("pkgid")
+ test_pkg_id = line.split()[pkgidIndex+1].strip("[]")
+ break
+ return test_pkg_id
+
+
+def doRemoteCMD(cmd=None):
+ if PARAMETERS.mode == "SDB":
+ cmd = "sdb -s %s shell %s" % (PARAMETERS.device, updateCMD(cmd))
+ else:
+ cmd = "ssh %s \"%s\"" % (PARAMETERS.device, updateCMD(cmd))
+
+ return doCMD(cmd)
+
+
+def doRemoteCopy(src=None, dest=None):
+ if PARAMETERS.mode == "SDB":
+ cmd_prefix = "sdb -s %s push" % PARAMETERS.device
+ cmd = "%s %s %s" % (cmd_prefix, src, dest)
+ else:
+ cmd = "scp -r %s %s:/%s" % (src, PARAMETERS.device, dest)
+
+ (return_code, output) = doCMD(cmd)
+ doRemoteCMD("sync")
+
+ if return_code != 0:
+ return True
+ else:
+ return False
+
+
+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(".xpk"):
+ pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
+ if not pkg_id:
+ action_status = False
+ continue
+ (return_code, output) = doRemoteCMD(
+ "pkgcmd -u -t xpk -q -n %s" % pkg_id)
+ for line in output:
+ if "Failure" in line:
+ action_status = False
+ break
+
+ (return_code, output) = doRemoteCMD(
+ "rm -rf %s" % PKG_SRC_DIR)
+ if return_code != 0:
+ action_status = False
+
+ return action_status
+
+
+def instPKGs():
+ action_status = True
+ (return_code, output) = doRemoteCMD(
+ "mkdir -p %s" % PKG_SRC_DIR)
+ 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(".xpk"):
+# if not doRemoteCopy(os.path.join(root, file), "%s/%s" % (SRC_DIR, file)):
+# action_status = False
+# (return_code, output) = doRemoteCMD(
+# "pkgcmd -i -t xpk -q -p %s/%s" % (SRC_DIR, file))
+# doRemoteCMD("rm -rf %s/%s" % (SRC_DIR, file))
+# for line in output:
+# if "Failure" in line:
+# action_status = False
+# break
+
+ # Do some special copy/delete... steps
+ '''
+ (return_code, output) = doRemoteCMD(
+ "mkdir -p %s/tests" % PKG_SRC_DIR)
+ if return_code != 0:
+ action_status = False
+
+ if not doRemoteCopy("specname/tests", "%s/tests" % PKG_SRC_DIR):
+ action_status = False
+ '''
+
+ return action_status
+
+
+def main():
+ try:
+ usage = "usage: inst.py -i"
+ opts_parser = OptionParser(usage=usage)
+ opts_parser.add_option(
+ "-m", dest="mode", action="store", help="Specify mode")
+ opts_parser.add_option(
+ "-s", dest="device", action="store", help="Specify device")
+ opts_parser.add_option(
+ "-i", dest="binstpkg", action="store_true", help="Install package")
+ opts_parser.add_option(
+ "-u", dest="buninstpkg", action="store_true", help="Uninstall package")
+ opts_parser.add_option(
+ "-a", dest="user", action="store", help="User name")
+ global PARAMETERS
+ (PARAMETERS, args) = opts_parser.parse_args()
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
+ sys.exit(1)
+
+ if not PARAMETERS.user:
+ PARAMETERS.user = "owner"
+ if not PARAMETERS.mode:
+ PARAMETERS.mode = "SDB"
+
+ if PARAMETERS.mode == "SDB":
+ if not PARAMETERS.device:
+ (return_code, output) = doCMD("sdb devices")
+ for line in output:
+ if str.find(line, "\tdevice") != -1:
+ PARAMETERS.device = line.split("\t")[0]
+ break
+ else:
+ PARAMETERS.mode = "SSH"
+
+ if not PARAMETERS.device:
+ print "No device provided"
+ sys.exit(1)
+
+ user_info = getUSERID()
+ re_code = user_info[0]
+ if re_code == 0 :
+ global XW_ENV
+ userid = user_info[1][0]
+ XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
+ else:
+ print "[Error] cmd commands error : %s"%str(user_info[1])
+ sys.exit(1)
+ if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
+ print "-i and -u are conflict"
+ sys.exit(1)
+
+ if PARAMETERS.buninstpkg:
+ if not uninstPKGs():
+ sys.exit(1)
+ else:
+ if not instPKGs():
+ sys.exit(1)
+
+if __name__ == "__main__":
+ main()
+ sys.exit(0)
--- /dev/null
+#!/usr/bin/env python
+#
+# Copyright (c) 2014 Intel Corporation.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# * Redistributions of works must retain the original copyright notice, this
+# list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the original copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of Intel Corporation nor the names of its contributors
+# may be used to endorse or promote products derived from this work without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors:
+# Fan, Yugang <yugang.fan@intel.com>
+
+import os
+import shutil
+import glob
+import time
+import sys
+import stat
+import random
+import json
+import logging
+import zipfile
+import signal
+import subprocess
+from optparse import OptionParser
+
+reload(sys)
+sys.setdefaultencoding('utf8')
+
+TOOL_VERSION = "v0.1"
+VERSION_FILE = "VERSION"
+DEFAULT_CMD_TIMEOUT = 600
+PKG_TYPES = ["apk", "xpk", "wgt", "apk-aio", "cordova-aio", "cordova", "embeddingapi"]
+PKG_MODES = ["shared", "embedded"]
+PKG_ARCHS = ["x86", "arm"]
+PKG_BLACK_LIST = []
+PKG_NAME = None
+BUILD_PARAMETERS = None
+BUILD_ROOT = None
+BUILD_ROOT_SRC = None
+BUILD_ROOT_SRC_PKG = None
+BUILD_ROOT_SRC_PKG_APP = None
+BUILD_ROOT_SRC_SUB_APP = None
+BUILD_ROOT_PKG = None
+BUILD_ROOT_PKG_APP = None
+LOG = None
+LOG_LEVEL = logging.DEBUG
+
+
+class ColorFormatter(logging.Formatter):
+
+ def __init__(self, msg):
+ logging.Formatter.__init__(self, msg)
+
+ def format(self, record):
+ red, green, yellow, blue = range(4)
+ colors = {'INFO': green, 'DEBUG': blue,
+ 'WARNING': yellow, 'ERROR': red}
+ msg = record.msg
+ if msg[0] == "+":
+ msg = "\33[01m" + msg[1:] + "\033[0m"
+ elif msg[0] == "=":
+ msg = "\33[07m" + msg + "\033[0m"
+ levelname = record.levelname
+ if levelname in colors:
+ msg_color = "\033[0;%dm" % (
+ 31 + colors[levelname]) + msg + "\033[0m"
+ record.msg = msg_color
+
+ return logging.Formatter.format(self, record)
+
+
+def pidExists(pid):
+ if pid < 0:
+ return False
+ try:
+ os.kill(pid, 0)
+ except OSError:
+ return False
+ else:
+ return True
+
+
+def isWindows():
+ return sys.platform == "cygwin" or sys.platform.startswith("win")
+
+
+def killProcesses(ppid=None):
+ if isWindows():
+ subprocess.check_call("TASKKILL /F /PID %s /T" % ppid)
+ else:
+ ppid = str(ppid)
+ pidgrp = []
+
+ def GetChildPids(ppid):
+ command = "ps -ef | awk '{if ($3 ==%s) print $2;}'" % str(ppid)
+ pids = os.popen(command).read()
+ pids = pids.split()
+ return pids
+
+ pidgrp.extend(GetChildPids(ppid))
+ for pid in pidgrp:
+ pidgrp.extend(GetChildPids(pid))
+
+ pidgrp.insert(0, ppid)
+ while len(pidgrp) > 0:
+ pid = pidgrp.pop()
+ try:
+ os.kill(int(pid), signal.SIGKILL)
+ return True
+ except OSError:
+ try:
+ os.popen("kill -9 %d" % int(pid))
+ return True
+ except Exception:
+ return False
+
+
+def safelyGetValue(origin_json=None, key=None):
+ if origin_json and key and key in origin_json:
+ return origin_json[key]
+ return None
+
+
+def checkContains(origin_str=None, key_str=None):
+ if origin_str.upper().find(key_str.upper()) >= 0:
+ return True
+ return False
+
+
+def getRandomStr():
+ str_pool = list("abcdefghijklmnopqrstuvwxyz1234567890")
+ random_str = ""
+ for i in range(15):
+ index = random.randint(0, len(str_pool) - 1)
+ random_str = random_str + str_pool[index]
+
+ return random_str
+
+
+def zipDir(dir_path, zip_file):
+ try:
+ if os.path.exists(zip_file):
+ if not doRemove([zip_file]):
+ return False
+ if not os.path.exists(os.path.dirname(zip_file)):
+ os.makedirs(os.path.dirname(zip_file))
+ z_file = zipfile.ZipFile(zip_file, "w")
+ orig_dir = os.getcwd()
+ os.chdir(dir_path)
+ for root, dirs, files in os.walk("."):
+ for i_file in files:
+ LOG.info("zip %s" % os.path.join(root, i_file))
+ z_file.write(os.path.join(root, i_file))
+ z_file.close()
+ os.chdir(orig_dir)
+ except Exception as e:
+ LOG.error("Fail to pack %s to %s: %s" % (dir_path, zip_file, e))
+ return False
+ LOG.info("Done to zip %s to %s" % (dir_path, zip_file))
+ return True
+
+
+def overwriteCopy(src, dest, symlinks=False, ignore=None):
+ if not os.path.exists(dest):
+ os.makedirs(dest)
+ shutil.copystat(src, dest)
+ sub_list = os.listdir(src)
+ if ignore:
+ excl = ignore(src, sub_list)
+ sub_list = [x for x in sub_list if x not in excl]
+ for i_sub in sub_list:
+ s_path = os.path.join(src, i_sub)
+ d_path = os.path.join(dest, i_sub)
+ if symlinks and os.path.islink(s_path):
+ if os.path.lexists(d_path):
+ os.remove(d_path)
+ os.symlink(os.readlink(s_path), d_path)
+ try:
+ s_path_s = os.lstat(s_path)
+ s_path_mode = stat.S_IMODE(s_path_s.st_mode)
+ os.lchmod(d_path, s_path_mode)
+ except Exception:
+ pass
+ elif os.path.isdir(s_path):
+ overwriteCopy(s_path, d_path, symlinks, ignore)
+ else:
+ shutil.copy2(s_path, d_path)
+
+
+def doCopy(src_item=None, dest_item=None):
+ LOG.info("Copying %s to %s" % (src_item, dest_item))
+ try:
+ if os.path.isdir(src_item):
+ overwriteCopy(src_item, dest_item, symlinks=True)
+ else:
+ if not os.path.exists(os.path.dirname(dest_item)):
+ LOG.info("Create non-existent dir: %s" %
+ os.path.dirname(dest_item))
+ os.makedirs(os.path.dirname(dest_item))
+ shutil.copy2(src_item, dest_item)
+ except Exception as e:
+ LOG.error("Fail to copy file %s: %s" % (src_item, e))
+ return False
+
+ return True
+
+
+def doRemove(target_file_list=None):
+ for i_file in target_file_list:
+ LOG.info("Removing %s" % i_file)
+ try:
+ if os.path.isdir(i_file):
+ shutil.rmtree(i_file)
+ else:
+ os.remove(i_file)
+ except Exception as e:
+ LOG.error("Fail to remove file %s: %s" % (i_file, e))
+ return False
+ return True
+
+
+def updateCopylistPrefix(src_default, dest_default, src_sub, dest_sub):
+ src_new = ""
+ dest_new = ""
+ PACK_TOOL_TAG = "PACK-TOOL-ROOT"
+
+ if src_sub[0:len(PACK_TOOL_TAG)] == PACK_TOOL_TAG:
+ src_new = src_sub.replace(PACK_TOOL_TAG, BUILD_PARAMETERS.pkgpacktools)
+ else:
+ src_new = os.path.join(src_default, src_sub)
+
+ if dest_sub[0:len(PACK_TOOL_TAG)] == PACK_TOOL_TAG:
+ dest_new = dest_sub.replace(PACK_TOOL_TAG, BUILD_ROOT)
+ else:
+ dest_new = os.path.join(dest_default, dest_sub)
+
+ return (src_new, dest_new)
+
+
+def buildSRC(src=None, dest=None, build_json=None):
+ if not os.path.exists(src):
+ LOG.info("+Src dir does not exist, skip build src process ...")
+ return True
+ if not doCopy(src, dest):
+ return False
+ if "blacklist" in build_json:
+ if build_json["blacklist"].count("") > 0:
+ build_json["blacklist"].remove("")
+ black_file_list = []
+ for i_black in build_json["blacklist"]:
+ black_file_list = black_file_list + \
+ glob.glob(os.path.join(dest, i_black))
+
+ black_file_list = list(set(black_file_list))
+ if not doRemove(black_file_list):
+ return False
+
+ if "copylist" in build_json:
+ for i_s_key in build_json["copylist"].keys():
+ if i_s_key and build_json["copylist"][i_s_key]:
+ (src_updated, dest_updated) = updateCopylistPrefix(
+ src, dest, i_s_key, build_json["copylist"][i_s_key])
+ if not doCopy(src_updated, dest_updated):
+ return False
+
+ return True
+
+
+def exitHandler(return_code=1):
+ LOG.info("+Cleaning build root folder ...")
+ if not BUILD_PARAMETERS.bnotclean and os.path.exists(BUILD_ROOT):
+ if not doRemove([BUILD_ROOT]):
+ LOG.error("Fail to clean build root, exit ...")
+ sys.exit(1)
+
+ if return_code == 0:
+ LOG.info("================ DONE ================")
+ else:
+ LOG.error(
+ "================ Found Something Wrong !!! ================")
+ sys.exit(return_code)
+
+
+def prepareBuildRoot():
+ LOG.info("+Preparing build root folder ...")
+ global BUILD_ROOT
+ global BUILD_ROOT_SRC
+ global BUILD_ROOT_SRC_PKG
+ global BUILD_ROOT_SRC_PKG_APP
+ global BUILD_ROOT_SRC_SUB_APP
+ global BUILD_ROOT_PKG
+ global BUILD_ROOT_PKG_APP
+
+ while True:
+ BUILD_ROOT = os.path.join("/tmp", getRandomStr())
+ if os.path.exists(BUILD_ROOT):
+ continue
+ else:
+ break
+
+ BUILD_ROOT_SRC = os.path.join(BUILD_ROOT, PKG_NAME)
+ BUILD_ROOT_SRC_PKG = os.path.join(BUILD_ROOT, "pkg")
+ BUILD_ROOT_SRC_PKG_APP = os.path.join(BUILD_ROOT, "pkg-app")
+ BUILD_ROOT_SRC_SUB_APP = os.path.join(BUILD_ROOT, "sub-app")
+ BUILD_ROOT_PKG = os.path.join(BUILD_ROOT, "pkg", "opt", PKG_NAME)
+ BUILD_ROOT_PKG_APP = os.path.join(BUILD_ROOT, "pkg-app", "opt", PKG_NAME)
+
+ if not doCopy(BUILD_PARAMETERS.srcdir, BUILD_ROOT_SRC):
+ return False
+ if not doRemove(
+ glob.glob(os.path.join(BUILD_ROOT_SRC, "%s*.zip" % PKG_NAME))):
+ return False
+
+ return True
+
+
+def doCMD(cmd, time_out=DEFAULT_CMD_TIMEOUT, no_check_return=False):
+ LOG.info("Doing CMD: [ %s ]" % cmd)
+ pre_time = time.time()
+ cmd_proc = subprocess.Popen(args=cmd, shell=True)
+ while True:
+ cmd_exit_code = cmd_proc.poll()
+ elapsed_time = time.time() - pre_time
+ if cmd_exit_code is None:
+ if elapsed_time >= time_out:
+ killProcesses(ppid=cmd_proc.pid)
+ LOG.error("Timeout to exe CMD")
+ return False
+ else:
+ if not no_check_return and cmd_exit_code != 0:
+ LOG.error("Fail to exe CMD")
+ return False
+ break
+ time.sleep(2)
+ return True
+
+
+def doCMDWithOutput(cmd, time_out=DEFAULT_CMD_TIMEOUT):
+ LOG.info("Doing CMD: [ %s ]" % cmd)
+ pre_time = time.time()
+ output = []
+ cmd_return_code = 1
+ cmd_proc = subprocess.Popen(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+
+ while True:
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
+ cmd_return_code = cmd_proc.poll()
+ elapsed_time = time.time() - pre_time
+ if cmd_return_code is None:
+ if elapsed_time >= time_out:
+ killProcesses(ppid=cmd_proc.pid)
+ LOG.error("Timeout to exe CMD")
+ return False
+ elif output_line == '' and cmd_return_code is not None:
+ break
+
+ sys.stdout.write("%s\n" % output_line)
+ sys.stdout.flush()
+ output.append(output_line)
+ if cmd_return_code != 0:
+ LOG.error("Fail to exe CMD")
+
+ return (cmd_return_code, output)
+
+
+def packXPK(build_json=None, app_src=None, app_dest=None, app_name=None):
+ pack_tool = os.path.join(BUILD_ROOT, "make_xpk.py")
+ if not os.path.exists(pack_tool):
+ if not doCopy(
+ os.path.join(BUILD_PARAMETERS.pkgpacktools, "make_xpk.py"),
+ pack_tool):
+ return False
+ orig_dir = os.getcwd()
+ os.chdir(BUILD_ROOT)
+ if os.path.exists("key.file"):
+ if not doRemove(["key.file"]):
+ os.chdir(orig_dir)
+ return False
+
+ key_file = safelyGetValue(build_json, "key-file")
+ if key_file == "key.file":
+ LOG.error(
+ "\"key.file\" is reserved name for default key file, "
+ "pls change the key file name ...")
+ os.chdir(orig_dir)
+ return False
+ if key_file:
+ pack_cmd = "python make_xpk.py %s %s -o %s" % (
+ app_src, key_file, os.path.join(app_dest, "%s.xpk" % app_name))
+ else:
+ pack_cmd = "python make_xpk.py %s key.file -o %s" % (
+ app_src, os.path.join(app_dest, "%s.xpk" % app_name))
+ if not doCMD(pack_cmd, DEFAULT_CMD_TIMEOUT):
+ os.chdir(orig_dir)
+ return False
+
+ os.chdir(orig_dir)
+ return True
+
+
+def packWGT(build_json=None, app_src=None, app_dest=None, app_name=None):
+ if not zipDir(app_src, os.path.join(app_dest, "%s.wgt" % app_name)):
+ return False
+
+ if BUILD_PARAMETERS.signature == True:
+ if safelyGetValue(build_json, "sign-flag") == "true":
+ if not os.path.exists(os.path.join(BUILD_ROOT, "signing")):
+ if not doCopy(
+ os.path.join(BUILD_PARAMETERS.pkgpacktools, "signing"),
+ os.path.join(BUILD_ROOT, "signing")):
+ return False
+ signing_cmd = "%s --dist platform %s" % (
+ os.path.join(BUILD_ROOT, "signing", "sign-widget.sh"),
+ os.path.join(app_dest, "%s.wgt" % app_name))
+ if not doCMD(signing_cmd, DEFAULT_CMD_TIMEOUT):
+ return False
+
+ return True
+
+
+def packAPK(build_json=None, app_src=None, app_dest=None, app_name=None):
+ app_name = app_name.replace("-", "_")
+
+ if not os.path.exists(os.path.join(BUILD_ROOT, "crosswalk")):
+ if not doCopy(
+ os.path.join(BUILD_PARAMETERS.pkgpacktools, "crosswalk"),
+ os.path.join(BUILD_ROOT, "crosswalk")):
+ return False
+
+ files = glob.glob(os.path.join(BUILD_ROOT, "crosswalk", "*.apk"))
+ if files:
+ if not doRemove(files):
+ return False
+
+ ext_opt = ""
+ cmd_opt = ""
+ url_opt = ""
+ mode_opt = ""
+ arch_opt = ""
+ icon_opt = ""
+
+ common_opts = safelyGetValue(build_json, "apk-common-opts")
+ if common_opts is None:
+ common_opts = ""
+
+ tmp_opt = safelyGetValue(build_json, "apk-ext-opt")
+ if tmp_opt:
+ ext_opt = "--extensions='%s'" % os.path.join(BUILD_ROOT_SRC, tmp_opt)
+
+ tmp_opt = safelyGetValue(build_json, "apk-cmd-opt")
+ if tmp_opt:
+ cmd_opt = "--xwalk-command-line='%s'" % tmp_opt
+
+ tmp_opt = safelyGetValue(build_json, "apk-url-opt")
+ if tmp_opt:
+ url_opt = "--app-url='%s'" % tmp_opt
+
+ tmp_opt = safelyGetValue(build_json, "apk-mode-opt")
+ if tmp_opt:
+ if tmp_opt in PKG_MODES:
+ mode_opt = "--mode=%s" % tmp_opt
+ else:
+ LOG.error("Got wrong app mode: %s" % tmp_opt)
+ return False
+ else:
+ mode_opt = "--mode=%s" % BUILD_PARAMETERS.pkgmode
+
+ tmp_opt = safelyGetValue(build_json, "apk-arch-opt")
+ if tmp_opt:
+ if tmp_opt in PKG_ARCHS:
+ arch_opt = "--arch=%s" % tmp_opt
+ else:
+ LOG.error("Got wrong app arch: %s" % tmp_opt)
+ return False
+ else:
+ arch_opt = "--arch=%s" % BUILD_PARAMETERS.pkgarch
+
+ tmp_opt = safelyGetValue(build_json, "apk-icon-opt")
+ if tmp_opt:
+ icon_opt = "--icon=%s" % tmp_opt
+ elif tmp_opt == "":
+ icon_opt = ""
+ else:
+ icon_opt = "--icon=%s/icon.png" % app_src
+
+ if safelyGetValue(build_json, "apk-type") == "MANIFEST":
+ pack_cmd = "python make_apk.py --package=org.xwalk.%s " \
+ "--manifest=%s/manifest.json %s %s %s %s %s" % (
+ app_name, app_src, mode_opt, arch_opt,
+ ext_opt, cmd_opt, common_opts)
+ elif safelyGetValue(build_json, "apk-type") == "HOSTEDAPP":
+ if not url_opt:
+ LOG.error(
+ "Fail to find the key \"apk-url-opt\" for hosted APP packing")
+ return False
+ pack_cmd = "python make_apk.py --package=org.xwalk.%s --name=%s %s " \
+ "%s %s %s %s %s" % (
+ app_name, app_name, mode_opt, arch_opt, ext_opt,
+ cmd_opt, url_opt, common_opts)
+ else:
+ pack_cmd = "python make_apk.py --package=org.xwalk.%s --name=%s " \
+ "--app-root=%s --app-local-path=index.html %s %s " \
+ "%s %s %s %s" % (
+ app_name, app_name, app_src, icon_opt, mode_opt,
+ arch_opt, ext_opt, cmd_opt, common_opts)
+
+ orig_dir = os.getcwd()
+ os.chdir(os.path.join(BUILD_ROOT, "crosswalk"))
+ if not doCMD(pack_cmd, DEFAULT_CMD_TIMEOUT):
+ os.chdir(orig_dir)
+ return False
+
+ files = glob.glob(os.path.join(BUILD_ROOT, "crosswalk", "*.apk"))
+ if files:
+ if not doCopy(files[0], os.path.join(app_dest, "%s.apk" % app_name)):
+ os.chdir(orig_dir)
+ return False
+ else:
+ LOG.error("Fail to find the apk file")
+ os.chdir(orig_dir)
+ return False
+
+ os.chdir(orig_dir)
+ return True
+
+
+def packCordova(build_json=None, app_src=None, app_dest=None, app_name=None):
+ pack_tool = os.path.join(BUILD_ROOT, "cordova")
+ app_name = app_name.replace("-", "_")
+ if not os.path.exists(pack_tool):
+ if not doCopy(
+ os.path.join(BUILD_PARAMETERS.pkgpacktools, "cordova"),
+ pack_tool):
+ return False
+
+ plugin_tool = os.path.join(BUILD_ROOT, "cordova_plugins")
+ if not os.path.exists(plugin_tool):
+ if not doCopy(
+ os.path.join(BUILD_PARAMETERS.pkgpacktools, "cordova_plugins"),
+ plugin_tool):
+ return False
+
+ orig_dir = os.getcwd()
+ os.chdir(pack_tool)
+ pack_cmd = "bin/create %s org.xwalk.%s %s" % (
+ app_name, app_name, app_name)
+ if not doCMD(pack_cmd, DEFAULT_CMD_TIMEOUT):
+ os.chdir(orig_dir)
+ return False
+
+ os.chdir(os.path.join(pack_tool, app_name))
+ plugin_dirs = os.listdir(plugin_tool)
+ for i_dir in plugin_dirs:
+ i_plugin_dir = os.path.join(plugin_tool, i_dir)
+ plugin_install_cmd = "plugman install --platform android --project " \
+ "./ --plugin %s" % i_plugin_dir
+ if not doCMD(plugin_install_cmd, DEFAULT_CMD_TIMEOUT):
+ os.chdir(orig_dir)
+ return False
+ os.chdir(pack_tool)
+
+ if not doCopy(app_src, os.path.join(pack_tool, app_name, "assets", "www")):
+ os.chdir(orig_dir)
+ return False
+ os.chdir(os.path.join(BUILD_ROOT, "cordova", app_name))
+ pack_cmd = "./cordova/build"
+ if not doCMD(pack_cmd, DEFAULT_CMD_TIMEOUT):
+ os.chdir(orig_dir)
+ return False
+
+ if not doCopy(os.path.join(
+ BUILD_ROOT, "cordova", app_name, "bin", "%s-debug.apk" %
+ app_name),
+ os.path.join(app_dest, "%s.apk" % app_name)):
+ os.chdir(orig_dir)
+ return False
+ os.chdir(orig_dir)
+ return True
+
+
+def packEmbeddingAPI(
+ build_json=None, app_src=None, app_dest=None, app_name=None):
+ app_name = app_name.replace("-", "_")
+
+ library_dir_name = safelyGetValue(build_json, "embeddingapi-library-name")
+ if not library_dir_name:
+ LOG.error("Fail to get embeddingapi-library-name ...")
+ return False
+
+ new_library_dir_name = "core_library"
+ pack_tool = os.path.join(app_src, "..", new_library_dir_name)
+
+ if os.path.exists(pack_tool):
+ if not doRemove([pack_tool]):
+ return False
+
+ if not doCopy(
+ os.path.join(BUILD_PARAMETERS.pkgpacktools, library_dir_name),
+ pack_tool):
+ return False
+
+ if os.path.exists(os.path.join(pack_tool, "bin", "res", "crunch")):
+ if not doRemove([os.path.join(pack_tool, "bin", "res", "crunch")]):
+ return False
+
+ orig_dir = os.getcwd()
+ android_project_path = os.path.join(app_src, "android-project")
+ try:
+ os.makedirs(android_project_path)
+ except Exception as e:
+ LOG.error("Fail to create tmp project dir: %s" % e)
+ return False
+
+ (return_code, output) = doCMDWithOutput("android list target")
+ api_level = ""
+ for line in output:
+ if "API level" in line:
+ api_level = line.split(":")[1].strip()
+ break
+ if not api_level:
+ LOG.error("Fail to get Android API Level")
+ os.chdir(orig_dir)
+ return False
+
+ android_project_cmd = "android create project --name %s --target " \
+ "android-%s --path %s --package com.%s " \
+ "--activity MainActivity" % (
+ app_name, api_level, android_project_path, app_name)
+ if not doCMD(android_project_cmd):
+ os.chdir(orig_dir)
+ return False
+
+ try:
+ update_file = open(
+ os.path.join(android_project_path, "project.properties"), "a+")
+ update_file.writelines(
+ "{0}\n".format(
+ "android.library.reference.1=../%s" %
+ new_library_dir_name))
+ update_file.close()
+ except Exception as e:
+ LOG.error(
+ "Fail to update %s: %s" %
+ (os.path.join(
+ android_project_path,
+ "project.properties"),
+ e))
+ os.chdir(orig_dir)
+ return False
+
+ if not doCopy(os.path.join(android_project_path, "build.xml"),
+ os.path.join(app_src, "build.xml")):
+ os.chdir(orig_dir)
+ return False
+
+ if not doCopy(
+ os.path.join(android_project_path, "project.properties"),
+ os.path.join(app_src, "project.properties")):
+ os.chdir(orig_dir)
+ return False
+
+ if not doCopy(
+ os.path.join(android_project_path, "local.properties"),
+ os.path.join(app_src, "local.properties")):
+ os.chdir(orig_dir)
+ return False
+
+ if not doCopy(
+ os.path.join(android_project_path, "local.properties"),
+ os.path.join(pack_tool, "local.properties")):
+ os.chdir(orig_dir)
+ return False
+
+ os.chdir(app_src)
+ if not doCMD("ant debug"):
+ os.chdir(orig_dir)
+ return False
+
+ if not doCopy(
+ os.path.join(app_src, "bin", "%s-debug.apk" % app_name),
+ os.path.join(app_dest, "%s.apk" % app_name)):
+ os.chdir(orig_dir)
+ return False
+ os.chdir(orig_dir)
+ return True
+
+
+def packAPP(build_json=None, app_src=None, app_dest=None, app_name=None):
+ LOG.info("Packing %s(%s)" % (app_name, app_src))
+ if not os.path.exists(app_dest):
+ try:
+ os.makedirs(app_dest)
+ except Exception as e:
+ LOG.error("Fail to init package install dest dir: %s" % e)
+ return False
+
+ if checkContains(BUILD_PARAMETERS.pkgtype, "XPK"):
+ if not packXPK(build_json, app_src, app_dest, app_name):
+ return False
+ elif checkContains(BUILD_PARAMETERS.pkgtype, "WGT"):
+ if not packWGT(build_json, app_src, app_dest, app_name):
+ return False
+ elif checkContains(BUILD_PARAMETERS.pkgtype, "APK"):
+ if not packAPK(build_json, app_src, app_dest, app_name):
+ return False
+ elif checkContains(BUILD_PARAMETERS.pkgtype, "CORDOVA"):
+ if not packCordova(build_json, app_src, app_dest, app_name):
+ return False
+ elif checkContains(BUILD_PARAMETERS.pkgtype, "EMBEDDINGAPI"):
+ if not packEmbeddingAPI(build_json, app_src, app_dest, app_name):
+ return False
+ else:
+ LOG.error("Got wrong pkg type: %s" % BUILD_PARAMETERS.pkgtype)
+ return False
+
+ LOG.info("Success to pack APP: %s" % app_name)
+ return True
+
+
+def createIndexFile(index_file_path=None, hosted_app=None):
+ try:
+ if hosted_app:
+ index_url = "http://127.0.0.1/opt/%s/webrunner/index.html?" \
+ "testsuite=../tests.xml&testprefix=../../.." % PKG_NAME
+ else:
+ index_url = "opt/%s/webrunner/index.html?testsuite=../tests.xml" \
+ "&testprefix=../../.." % PKG_NAME
+ html_content = "<!doctype html><head><meta http-equiv='Refresh' " \
+ "content='1; url=%s'></head>" % index_url
+ index_file = open(index_file_path, "w")
+ index_file.write(html_content)
+ index_file.close()
+ except Exception as e:
+ LOG.error("Fail to create index.html for top-app: %s" % e)
+ return False
+ LOG.info("Success to create index file %s" % index_file_path)
+ return True
+
+
+def buildSubAPP(app_dir=None, build_json=None, app_dest_default=None):
+ app_dir_inside = safelyGetValue(build_json, "app-dir")
+ if app_dir_inside:
+ app_dir = app_dir_inside
+ LOG.info("+Building sub APP(s) from %s ..." % app_dir)
+ app_dir = os.path.join(BUILD_ROOT_SRC, app_dir)
+ app_name = safelyGetValue(build_json, "app-name")
+ if not app_name:
+ app_name = os.path.basename(app_dir)
+
+ app_src = os.path.join(BUILD_ROOT_SRC_SUB_APP, app_name)
+ if buildSRC(app_dir, app_src, build_json):
+ app_dest = safelyGetValue(build_json, "install-path")
+ if app_dest:
+ app_dest = os.path.join(app_dest_default, app_dest)
+ else:
+ app_dest = app_dest_default
+
+ if safelyGetValue(build_json, "all-apps") == "true":
+ app_dirs = os.listdir(app_src)
+ apps_num = 0
+ for i_app_dir in app_dirs:
+ if os.path.isdir(os.path.join(app_src, i_app_dir)):
+ i_app_name = os.path.basename(i_app_dir)
+ if not packAPP(
+ build_json, os.path.join(app_src, i_app_name),
+ app_dest, i_app_name):
+ return False
+ else:
+ apps_num = apps_num + 1
+ if apps_num > 0:
+ LOG.info("Totally packed %d apps in %s" % (apps_num, app_dir))
+ return True
+ else:
+ return packAPP(build_json, app_src, app_dest, app_name)
+ return False
+
+
+def buildPKGAPP(build_json=None):
+ LOG.info("+Building package APP ...")
+ if not doCopy(os.path.join(BUILD_ROOT_SRC, "icon.png"),
+ os.path.join(BUILD_ROOT_SRC_PKG_APP, "icon.png")):
+ return False
+
+ if checkContains(BUILD_PARAMETERS.pkgtype, "XPK"):
+ if not doCopy(
+ os.path.join(BUILD_ROOT_SRC, "manifest.json"),
+ os.path.join(BUILD_ROOT_SRC_PKG_APP, "manifest.json")):
+ return False
+ elif checkContains(BUILD_PARAMETERS.pkgtype, "WGT"):
+ if not doCopy(os.path.join(BUILD_ROOT_SRC, "config.xml"),
+ os.path.join(BUILD_ROOT_SRC_PKG_APP, "config.xml")):
+ return False
+
+ hosted_app = False
+ if safelyGetValue(build_json, "hosted-app") == "true":
+ hosted_app = True
+ if not createIndexFile(
+ os.path.join(BUILD_ROOT_SRC_PKG_APP, "index.html"), hosted_app):
+ return False
+
+ if not hosted_app:
+ if "blacklist" not in build_json:
+ build_json.update({"blacklist": []})
+ build_json["blacklist"].extend(PKG_BLACK_LIST)
+ if not buildSRC(BUILD_ROOT_SRC, BUILD_ROOT_PKG_APP, build_json):
+ return False
+
+ if "subapp-list" in build_json:
+ for i_sub_app in build_json["subapp-list"].keys():
+ if not buildSubAPP(
+ i_sub_app, build_json["subapp-list"][i_sub_app],
+ BUILD_ROOT_PKG_APP):
+ return False
+
+ if not packAPP(
+ build_json, BUILD_ROOT_SRC_PKG_APP, BUILD_ROOT_PKG, PKG_NAME):
+ return False
+
+ return True
+
+
+def buildPKG(build_json=None):
+ if "blacklist" not in build_json:
+ build_json.update({"blacklist": []})
+ build_json["blacklist"].extend(PKG_BLACK_LIST)
+ if not buildSRC(BUILD_ROOT_SRC, BUILD_ROOT_PKG, build_json):
+ return False
+
+ if "subapp-list" in build_json:
+ for i_sub_app in build_json["subapp-list"].keys():
+ if not buildSubAPP(
+ i_sub_app, build_json["subapp-list"][i_sub_app],
+ BUILD_ROOT_PKG):
+ return False
+
+ if "pkg-app" in build_json:
+ if not buildPKGAPP(build_json["pkg-app"]):
+ return False
+
+ return True
+
+
+def main():
+ global LOG
+ LOG = logging.getLogger("pack-tool")
+ LOG.setLevel(LOG_LEVEL)
+ stream_handler = logging.StreamHandler()
+ stream_handler.setLevel(LOG_LEVEL)
+ stream_formatter = ColorFormatter("[%(asctime)s] %(message)s")
+ stream_handler.setFormatter(stream_formatter)
+ LOG.addHandler(stream_handler)
+
+ try:
+ usage = "Usage: ./pack.py -t apk -m shared -a x86"
+ opts_parser = OptionParser(usage=usage)
+ opts_parser.add_option(
+ "-c",
+ "--cfg",
+ dest="pkgcfg",
+ help="specify the path of config json file")
+ opts_parser.add_option(
+ "-t",
+ "--type",
+ dest="pkgtype",
+ help="specify the pkg type, e.g. apk, xpk, wgt ...")
+ opts_parser.add_option(
+ "-m",
+ "--mode",
+ dest="pkgmode",
+ help="specify the apk mode, e.g. shared, embedded")
+ opts_parser.add_option(
+ "-a",
+ "--arch",
+ dest="pkgarch",
+ help="specify the apk arch, e.g. x86, arm")
+ opts_parser.add_option(
+ "-d",
+ "--dest",
+ dest="destdir",
+ help="specify the installation folder for packed package")
+ opts_parser.add_option(
+ "-s",
+ "--src",
+ dest="srcdir",
+ help="specify the path of pkg resource for packing")
+ opts_parser.add_option(
+ "--tools",
+ dest="pkgpacktools",
+ help="specify the parent folder of pack tools")
+ opts_parser.add_option(
+ "--notclean",
+ dest="bnotclean",
+ action="store_true",
+ help="disable the build root clean after the packing")
+ opts_parser.add_option(
+ "--sign",
+ dest="signature",
+ action="store_true",
+ help="signature operation will be done when packing wgt")
+ opts_parser.add_option(
+ "-v",
+ "--version",
+ dest="bversion",
+ action="store_true",
+ help="show this tool's version")
+ opts_parser.add_option(
+ "--pkg-version",
+ dest="pkgversion",
+ help="specify the pkg version, e.g. 0.0.0.1")
+
+ if len(sys.argv) == 1:
+ sys.argv.append("-h")
+
+ global BUILD_PARAMETERS
+ (BUILD_PARAMETERS, args) = opts_parser.parse_args()
+ except Exception as e:
+ LOG.error("Got wrong options: %s, exit ..." % e)
+ sys.exit(1)
+
+ if BUILD_PARAMETERS.bversion:
+ print "Version: %s" % TOOL_VERSION
+ sys.exit(0)
+
+ if not BUILD_PARAMETERS.srcdir:
+ BUILD_PARAMETERS.srcdir = os.getcwd()
+ BUILD_PARAMETERS.srcdir = os.path.expanduser(BUILD_PARAMETERS.srcdir)
+
+ if not os.path.exists(
+ os.path.join(BUILD_PARAMETERS.srcdir, "..", "..", VERSION_FILE)):
+ if not os.path.exists(
+ os.path.join(BUILD_PARAMETERS.srcdir, "..", VERSION_FILE)):
+ if not os.path.exists(
+ os.path.join(BUILD_PARAMETERS.srcdir, VERSION_FILE)):
+ LOG.info(
+ "Not found pkg version file, try to use option --pkg-version")
+ pkg_version_file_path = None
+ else:
+ pkg_version_file_path = os.path.join(
+ BUILD_PARAMETERS.srcdir, VERSION_FILE)
+ else:
+ pkg_version_file_path = os.path.join(
+ BUILD_PARAMETERS.srcdir, "..", VERSION_FILE)
+ else:
+ pkg_version_file_path = os.path.join(
+ BUILD_PARAMETERS.srcdir, "..", "..", VERSION_FILE)
+
+ try:
+ pkg_main_version = 0
+ pkg_release_version = 0
+ if BUILD_PARAMETERS.pkgversion:
+ LOG.info("Using %s as pkg version " % BUILD_PARAMETERS.pkgversion)
+ pkg_main_version = BUILD_PARAMETERS.pkgversion
+ else:
+ if pkg_version_file_path is not None:
+ LOG.info("Using pkg version file: %s" % pkg_version_file_path)
+ with open(pkg_version_file_path, "rt") as pkg_version_file:
+ pkg_version_raw = pkg_version_file.read()
+ pkg_version_file.close()
+ pkg_version_json = json.loads(pkg_version_raw)
+ pkg_main_version = pkg_version_json["main-version"]
+ pkg_release_version = pkg_version_json["release-version"]
+ except Exception as e:
+ LOG.error("Fail to read pkg version file: %s, exit ..." % e)
+ sys.exit(1)
+
+ if not BUILD_PARAMETERS.pkgtype:
+ LOG.error("No pkg type provided, exit ...")
+ sys.exit(1)
+ elif not BUILD_PARAMETERS.pkgtype in PKG_TYPES:
+ LOG.error("Wrong pkg type, only support: %s, exit ..." %
+ PKG_TYPES)
+ sys.exit(1)
+
+ if BUILD_PARAMETERS.pkgtype == "apk" or \
+ BUILD_PARAMETERS.pkgtype == "apk-aio":
+ if not BUILD_PARAMETERS.pkgmode:
+ LOG.error("No pkg mode option provided, exit ...")
+ sys.exit(1)
+ elif not BUILD_PARAMETERS.pkgmode in PKG_MODES:
+ LOG.error(
+ "Wrong pkg mode option provided, only support:%s, exit ..." %
+ PKG_MODES)
+ sys.exit(1)
+
+ if not BUILD_PARAMETERS.pkgarch:
+ LOG.error("No pkg arch option provided, exit ...")
+ sys.exit(1)
+ elif not BUILD_PARAMETERS.pkgarch in PKG_ARCHS:
+ LOG.error(
+ "Wrong pkg arch option provided, only support:%s, exit ..." %
+ PKG_ARCHS)
+ sys.exit(1)
+
+ if BUILD_PARAMETERS.pkgtype == "apk-aio" or \
+ BUILD_PARAMETERS.pkgtype == "cordova-aio":
+ if not BUILD_PARAMETERS.destdir or not os.path.exists(
+ BUILD_PARAMETERS.destdir):
+ LOG.error("No all-in-one installation dest dir found, exit ...")
+ sys.exit(1)
+
+ elif not BUILD_PARAMETERS.destdir:
+ BUILD_PARAMETERS.destdir = BUILD_PARAMETERS.srcdir
+ BUILD_PARAMETERS.destdir = os.path.expanduser(BUILD_PARAMETERS.destdir)
+
+ if not BUILD_PARAMETERS.pkgpacktools:
+ BUILD_PARAMETERS.pkgpacktools = os.path.join(
+ BUILD_PARAMETERS.srcdir, "..", "..", "tools")
+ BUILD_PARAMETERS.pkgpacktools = os.path.expanduser(
+ BUILD_PARAMETERS.pkgpacktools)
+
+ config_json = None
+ if BUILD_PARAMETERS.pkgcfg:
+ config_json_file_path = BUILD_PARAMETERS.pkgcfg
+ else:
+ config_json_file_path = os.path.join(
+ BUILD_PARAMETERS.srcdir, "suite.json")
+ try:
+ LOG.info("Using config json file: %s" % config_json_file_path)
+ with open(config_json_file_path, "rt") as config_json_file:
+ config_raw = config_json_file.read()
+ config_json_file.close()
+ config_json = json.loads(config_raw)
+ except Exception as e:
+ LOG.error("Fail to read config json file: %s, exit ..." % e)
+ sys.exit(1)
+
+ global PKG_NAME
+ PKG_NAME = safelyGetValue(config_json, "pkg-name")
+ if not PKG_NAME:
+ PKG_NAME = os.path.basename(BUILD_PARAMETERS.srcdir)
+ LOG.warning(
+ "Fail to read pkg name from json, "
+ "using src dir name as pkg name ...")
+
+ LOG.info("================= %s (%s-%s) ================" %
+ (PKG_NAME, pkg_main_version, pkg_release_version))
+
+ if not safelyGetValue(config_json, "pkg-list"):
+ LOG.error("Fail to read pkg-list, exit ...")
+ sys.exit(1)
+
+ pkg_json = None
+ for i_pkg in config_json["pkg-list"].keys():
+ i_pkg_list = i_pkg.replace(" ", "").split(",")
+ if BUILD_PARAMETERS.pkgtype in i_pkg_list:
+ pkg_json = config_json["pkg-list"][i_pkg]
+
+ if not pkg_json:
+ LOG.error("Fail to read pkg json, exit ...")
+ sys.exit(1)
+
+ if not prepareBuildRoot():
+ exitHandler(1)
+
+ if "pkg-blacklist" in config_json:
+ PKG_BLACK_LIST.extend(config_json["pkg-blacklist"])
+
+ if not buildPKG(pkg_json):
+ exitHandler(1)
+
+ LOG.info("+Building package ...")
+ if BUILD_PARAMETERS.pkgtype == "apk-aio" or \
+ BUILD_PARAMETERS.pkgtype == "cordova-aio":
+ pkg_file_list = os.listdir(os.path.join(BUILD_ROOT, "pkg"))
+ for i_file in pkg_file_list:
+ if not doCopy(
+ os.path.join(BUILD_ROOT, "pkg", i_file),
+ os.path.join(BUILD_PARAMETERS.destdir, i_file)):
+ exitHandler(1)
+ else:
+ pkg_file = os.path.join(
+ BUILD_PARAMETERS.destdir,
+ "%s-%s.%s.zip" %
+ (PKG_NAME,
+ pkg_main_version,
+ pkg_release_version))
+
+
+ if not zipDir(os.path.join(BUILD_ROOT, "pkg"), pkg_file):
+ exitHandler(1)
+
+if __name__ == "__main__":
+ main()
+ exitHandler(0)
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) 2013 Intel Corporation
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of works must retain the original copyright notice, this list
+# of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the original copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Intel Corporation nor the names of its contributors
+# may be used to endorse or promote products derived from this work without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors:
+# Yue, jianhui <jianhuix.a.yue@intel.com>
+
+function func_install()
+{
+ if [ $# != 1 ];then
+ echo "Need to add the parameter"
+ return 1
+ fi
+ path=$(dirname $(dirname $0))
+ PACKAGENAME="$path/$1"
+ p_name=$1
+ APP_NAME=${p_name%.*}
+ pkgcmd -i -t wgt -q -p $PACKAGENAME
+ find_app $APP_NAME
+ pkgnum=`echo "$pkgids"|wc -w`
+ if [ $pkgnum -lt 1 ]; then
+ echo "The installation is failed"
+ return 1
+ else
+ echo "The widget is installed successfully"
+ return 0
+ fi
+}
+
+function func_uninstall()
+{
+ if [ $# != 1 ];then
+ echo "Need to add the parameter"
+ return 1
+ fi
+ path=$(dirname $(dirname $0))
+ PACKAGENAME="$path/$1"
+ p_name=$1
+ APP_NAME=${p_name%.*}
+ find_app $APP_NAME
+ pkgnum=`echo "$pkgids"|wc -w`
+ if [ $pkgnum -lt 1 ]; then
+ echo "The widget is not installed"
+ return 1
+ fi
+ uninstall_app $APP_NAME
+ find_app $APP_NAME
+ pkgnum=`echo "$pkgids"|wc -w`
+ if [ $pkgnum -lt 1 ]; then
+ echo "The installation is failed"
+ return 1
+ else
+ echo "The widget is installed successfully"
+ return 0
+ fi
+}
+
+function func_check()
+{
+ if [ $# != 1 ];then
+ echo "Need to add the parameter"
+ return 1
+ fi
+ p_name=$1
+ APP_NAME=${p_name%.*}
+ find_app $APP_NAME
+ pkgnum=`echo "$pkgids"|wc -w`
+ if [ $pkgnum -lt 1 ]; then
+ echo "The application id is not exist"
+ return 1
+ else
+ echo "The application id is exist"
+ return 0
+ fi
+}
+
+##usage: uninstall_app $app_name(e.g. uninstall_app tct-sp02-wrt-tests)##
+function uninstall_app(){
+ pkgids=`pkgcmd -l |grep $1 |awk -F "pkgid" '{print $2}' |awk -F '[' '{print $2}'|awk -F ']' '{print $1}'`
+ for pkgid in $pkgids
+ do
+ pkgcmd -u -t wgt -q -n $pkgid
+ done
+}
+
+##usage: find_app $app_name(e.g. find_app tct-sp02-wrt-tests)##
+function find_app(){
+ pkgids=`pkgcmd -l |grep $1 |awk -F "pkgid" '{print $2}' |awk -F '[' '{print $2}'|awk -F ']' '{print $1}'`
+ appid=`app_launcher -l | grep $1 | head -n 1| awk '{print $2}'`
+ appid=${appid:1:${#appid}-2}
+}
+
+##usage: launch_app $app_name(e.g. launch_app tct-sp02-wrt-tests)##
+function launch_app(){
+ find_app $1
+ pkgnum=`echo "$appid"|wc -w`
+ if [ $pkgnum -eq 1 ]; then
+ nohup app_launcher -s $appid &>/dev/null &
+ else
+ echo "launch error, please check if exists this app or there are more than one app with this app_name"
+ fi
+}
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) 2013 Intel Corporation
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of works must retain the original copyright notice, this list
+# of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the original copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Intel Corporation nor the names of its contributors
+# may be used to endorse or promote products derived from this work without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors:
+# Cao, Jenny <jenny.q.cao@intel.com>
+# Yue, jianhui <jianhuix.a.yue@intel.com>
+
+source $(dirname $0)/Common
+
+if [ $# != 1 ];then
+ echo "usage $0 + packagename"
+fi
+RESOURCE_DIR=/home/owner/share
+PACKAGENAME="$RESOURCE_DIR/tct/opt/tct-ext02-wrt-tests/$1"
+p_name=$1
+APP_NAME=${p_name%.*}
+find_app $APP_NAME
+
+if [ -n $pkgids ];then
+ uninstall_app $APP_NAME
+ sleep 5
+fi
+func_install $1
+if [ $? -eq 0 ];then
+ echo -e " pkgcmd install widget successfully!"
+ find_app $APP_NAME
+ uninstall_app $APP_NAME
+ exit 0
+else
+ echo -e "pkgcmd install widget failed!"
+ exit 1
+fi
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) 2013 Intel Corporation
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of works must retain the original copyright notice, this list
+# of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the original copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Intel Corporation nor the names of its contributors
+# may be used to endorse or promote products derived from this work without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors:
+# Yue, jianhui <jianhuix.a.yue@intel.com>
+
+source $(dirname $0)/Common
+
+func_install application-id-exist.wgt
+if [ $? -eq 1 ];then
+ echo "The installation of lifecycle-launch-installed-app.wgt is failed"
+ exit 1
+fi
+
+func_check application-id-exist.wgt
+if [ $? -eq 1 ];then
+ echo "The application id is not exist"
+ func_uninstall application-id-exist.wgt
+ exit 1
+fi
+
+func_uninstall application-id-exist.wgt
+
+exit 0
--- /dev/null
+#!/bin/bash
+#
+# Copyright (C) 2015 Intel Corporation
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of works must retain the original copyright notice, this list
+# of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the original copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of Intel Corporation nor the names of its contributors
+# may be used to endorse or promote products derived from this work without
+# specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors:
+# Yin, Haichao <haichaox.yin@intel.com>
+
+source $(dirname $0)/Common
+func_uninstall application-required-version-support-gts-current.wgt
+sleep 1
+func_uninstall application-required-version-support-gts-current-to-lts.wgt
+sleep 1
+
+func_install application-required-version-support-gts-current.wgt
+if [ $? -eq 0 ];then
+ echo "The installation of application-required-version-support-gts-current.wgt is successfully, but it should be failed"
+ exit 1
+fi
+sleep 1
+
+func_install application-required-version-support-gts-current-to-lts.wgt
+if [ $? -eq 1 ];then
+ echo "The installation of application-required-version-support-gts-current-to-lts.wgt is failed"
+ exit 1
+fi
+exit 0
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://tizen.org/setting-install-location-internal-only-no-card" version="3.0" viewmodes="maximized">
+ <tizen:application id="wrt2sil052.settinginstalllocationinternalonlynocard" package="wrt2sil052" required_version="3.0"/>
+ <content src="index.html"/>
+ <icon src="icon.png" height="117" width="117"/>
+ <name>setting-install-location-internal-only-no-card</name>
+ <tizen:setting install-location="internal-only"/>
+</widget>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ yunfenx.hao <yunfenx.hao@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>WRT Test: setting-install-location-internal-only-no-card</title>
+ <link rel="author" title="Intel" href="http://www.intel.com"/>
+ <link rel="help" href=""/>
+ <meta name="flags" content=""/>
+ <meta name="assert" content="Check that when set install-location to 'internal-only', the install location is internal storage if external storage is not available."/>
+ <meta charset="utf-8">
+ <script language="javascript" type="text/javascript">
+ function onloaded(){
+ var img_path = document.getElementById("img1");
+ var excepted = "file:///home/owner/apps_rw/wrt2sil052/res/wgt/icon.png";
+ try {
+ if(img_path.src==excepted) {
+ document.getElementById("result").innerHTML = "PASS";
+ } else {
+ document.getElementById("result").innerHTML = "FAIL";
+ }
+ }catch(e) {
+ document.getElementById("result").innerHTML = e.message;
+ }
+ }
+ </script>
+ </head>
+ <body bgcolor="FFFFFF" onload="onloaded();">
+ <img id="img1" src="icon.png" height="1" width="1"/>
+ <div id="result">NOT RUN</div>
+ <p></p>
+ </body>
+</html>
--- /dev/null
+app-control-complex-wgt-1
+app-control-complex-wgt-2
+app-control-complex-wgt-3
+app-control-complex-wgt-4
+appcontrol-test-app
+unit-test-for-app-control
--- /dev/null
+{
+ "pkg-blacklist": [
+ "config.xml",
+ "pack.py",
+ "testcase.xsl",
+ "testresult.xsl",
+ "tests.css",
+ "icon.png",
+ "manifest.json",
+ "suite.json",
+ "inst.*"
+ ],
+ "pkg-list": {
+ "wgt": {
+ "blacklist": [
+ "*"
+ ],
+ "copylist": {
+ "inst.wgt.py": "inst.py",
+ "scripts": "scripts",
+ "support": "support",
+ "tests.full.xml": "tests.full.xml",
+ "tests.xml": "tests.xml",
+ "w3c": "w3c"
+ },
+ "subapp-list": {
+ "application-id-exist": {
+ "sign-flag": "true"
+ },
+ "application-required-version-support": {
+ "sign-flag": "true"
+ },
+ "support": {
+ "sign-flag": "true"
+ },
+ "tizen-application-id-is-all-right": {
+ "sign-flag": "true"
+ },
+ "tizen-application-id-is-one-bytes": {
+ "sign-flag": "true"
+ },
+ "tizen-application-id-is-rightful": {
+ "sign-flag": "true"
+ },
+ "w3c": {
+ "sign-flag": "true"
+ },
+ "web-applications-with-namespace-xmlns-enable": {
+ "sign-flag": "true"
+ },
+ "test-hosted-widget-with-invalid-tizencontent": {
+ "sign-flag": "true"
+ },
+ "setting-install-location-internal-only-no-card": {
+ "sign-flag": "true"
+ }
+ }
+ }
+ },
+ "pkg-name": "tct-ext02-wrt-tests"
+}
--- /dev/null
+Copyright (c) 2013 Intel Corporation.
+Except as noted, this software is licensed under BSD-3-Clause License.
+Please, see the LICENSE.BSD-3 file for the BSD-3-Clause License.
+
+Following resources are licensed under its own license.
+
+blue-100x100.png,
+red-100x100.png,
+green-100x100.png:
+The above files are licensed under Intel BSD-3-Clause License.
+Created by the Paint application.
--- /dev/null
+/*
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Hao, Yunfei <yunfeix.hao@intel.com>
+
+*/
+
+#test-blue {
+ background-color: blue;
+ height: 100px;
+ width: 100px;
+}
--- /dev/null
+/*
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Zhang, Zhiqiang <zhiqiang.zhang@intel.com>
+
+*/
+
+var X = 10;
+var Y = eval(X + 17);
--- /dev/null
+Copyright (c) 2013 Intel Corporation.
+Except as noted, this software is licensed under BSD-3-Clause License.
+Please, see the LICENSE.BSD-3 file for the BSD-3-Clause License.
+
+Following resources are licensed under its own license.
+
+red-green.theora.ogv:
+The above file is licensed under the MIT License.
+From https://www.khronos.org/registry/webgl/sdk/tests/conformance/resources/red-green.theora.ogv
+Please see http://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/test-guidelines.md
--- /dev/null
+/*
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Zhang, Zhiqiang <zhiqiang.zhang@intel.com>
+
+*/
+var q = null;
+function getVideoURI (){
+
+}
--- /dev/null
+/*
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Zhang, Zhiqiang <zhiqiang.zhang@intel.com>
+
+*/
+function getVideoURI (){
+
+}
--- /dev/null
+/*
+Copyright (c) 2013 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Zhang, Zhiqiang <zhiqiang.zhang@intel.com>
+
+*/
+var q = null;
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget id="http://tizen.org/application-id-exist" xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" version='3.0'>
+ <access origin="*"/>
+ <icon src="icon.png" height="117" width="117"/>
+ <content src=""/>
+ <name>test-hosted-widget-with-invalid-tizencontent</name>
+ <tizen:application id="wrt2app005.ApplicationIdExist" package="wrt2app005" required_version="3.0"/>
+ <tizen:setting screen-orientation="landscape" contextmenu="disable"/>
+</widget>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ Yue, Jianhui <jianhuix.a.yue@intel.com>
+
+-->
+
+<html>
+ <head>
+ <title>WRT Test: test-hosted-widget-with-invalid-tizencontent</title>
+ <link rel="author" title="Intel" href="http://www.intel.com"/>
+ <link rel="help" href=""/>
+ <meta name="flags" content=""/>
+ <meta name="assert" content="Check that the invalid content src webapp can be installed."/>
+ <meta charset="utf-8">
+ </head>
+ <body>
+ <p>1. Install test-hosted-widget-with-invalid-tizencontent.wgt<br>Expected: widget application is able to install successfully<br></p>
+ </body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+ <xsl:template match="/">
+ <html>
+ <STYLE type="text/css">
+ @import "tests.css";
+ </STYLE>
+ <head>
+ <script type="text/javascript" src="jquery.min.js"/>
+ </head>
+ <body>
+ <div id="testcasepage">
+ <div id="title">
+ <table>
+ <tr>
+ <td>
+ <h1>Test Cases</h1>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id="suites">
+ <a name="contents"/>
+ <table>
+ <tr>
+ <th>Test Suite</th>
+ <th>Total</th>
+ <th>Auto</th>
+ <th>Manual</th>
+ </tr>
+ <tr>
+ <td>
+ Total
+ </td>
+ <td>
+ <xsl:value-of select="count(test_definition/suite/set//testcase)"/>
+ </td>
+ <td>
+ <xsl:value-of select="count(test_definition/suite/set//testcase[@execution_type = 'auto'])"/>
+ </td>
+ <td>
+ <xsl:value-of select="count(test_definition/suite/set//testcase[@execution_type != 'auto'])"/>
+ </td>
+ </tr>
+ <xsl:for-each select="test_definition/suite">
+ <tr>
+ <td>
+ <a>
+ <xsl:attribute name="href">
+ #<xsl:value-of select="@name"/>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </a>
+ </td>
+ <td>
+ <xsl:value-of select="count(set//testcase)"/>
+ </td>
+ <td>
+ <xsl:value-of select="count(set/testcase[@execution_type = 'auto'])"/>
+ </td>
+ <td>
+ <xsl:value-of select="count(set/testcase[@execution_type != 'auto'])"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </div>
+ <div id="title">
+ <table>
+ <tr>
+ <td class="title">
+ <h1>Detailed Test Cases</h1>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id="cases">
+ <xsl:for-each select="test_definition/suite">
+ <xsl:sort select="@name"/>
+ <div id="btc">
+ <a href="#contents">Back to Contents</a>
+ </div>
+ <div id="suite_title">
+ Test Suite:
+ <xsl:value-of select="@name"/>
+ <a><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></a>
+ </div>
+ <table>
+ <tr>
+ <th>Case_ID</th>
+ <th>Purpose</th>
+ <th>Type</th>
+ <th>Component</th>
+ <th>Execution Type</th>
+ <th>Description</th>
+ <th>Specification</th>
+ </tr>
+ <xsl:for-each select=".//set">
+ <xsl:sort select="@name"/>
+ <tr>
+ <td colspan="7">
+ Test Set:
+ <xsl:value-of select="@name"/>
+ </td>
+ </tr>
+ <xsl:for-each select=".//testcase">
+ <!-- xsl:sort select="@id" /> -->
+ <tr>
+ <td>
+ <xsl:value-of select="@id"/>
+ </td>
+ <td>
+ <xsl:value-of select="@purpose"/>
+ </td>
+ <td>
+ <xsl:value-of select="@type"/>
+ </td>
+ <td>
+ <xsl:value-of select="@component"/>
+ </td>
+ <td>
+ <xsl:value-of select="@execution_type"/>
+ </td>
+ <td>
+ <p>
+ Pre_condition:
+ <xsl:value-of select=".//description/pre_condition"/>
+ </p>
+ <p>
+ Post_condition:
+ <xsl:value-of select=".//description/post_condition"/>
+ </p>
+ <p>
+ Test Script Entry:
+ <xsl:value-of select=".//description/test_script_entry"/>
+ </p>
+ <p>
+ Steps:
+ <p/>
+ <xsl:for-each select=".//description/steps/step"><xsl:sort select="@order"/>
+ Step
+ <xsl:value-of select="@order"/>
+ :
+ <xsl:value-of select="./step_desc"/>
+ ;
+ <p/>
+ Expected Result:
+ <xsl:value-of select="./expected"/>
+ <p/>
+ </xsl:for-each>
+ </p>
+ </td>
+ <td>
+ <xsl:for-each select=".//specs/spec"><b>[Spec_Assertion]:</b><br/>
+ [Category]:
+ <xsl:value-of select="./spec_assertion/@category"/>
+ <br/>
+ [Section]:
+ <xsl:value-of select="./spec_assertion/@section"/>
+ <br/>
+ [Specification]:
+ <xsl:value-of select="./spec_assertion/@specification"/>
+ <br/>
+ [Interface]:
+ <xsl:value-of select="./spec_assertion/@interface"/>
+ <br/>
+ <xsl:choose><xsl:when test="./spec_assertion/@element_name">
+ [<xsl:value-of select="./spec_assertion/@element_type"/>]:
+ <xsl:value-of select="./spec_assertion/@element_name"/>
+ <br/>
+ </xsl:when></xsl:choose>
+ [URL]:
+ <xsl:value-of select="./spec_url"/>
+ <br/>
+ [Statement]:
+ <xsl:value-of select="./spec_statement"/>
+ <br/>
+ </xsl:for-each>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:for-each>
+ </table>
+ </xsl:for-each>
+ </div>
+ </div>
+ <div id="goTopBtn">
+ <img border="0" src="./back_top.png"/>
+ </div>
+ <script type="text/javascript" src="application.js"/>
+ <script language="javascript" type="text/javascript">
+ $(document).ready(function(){
+ goTopEx();
+ });
+ </script>
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
+ <xsl:template match="/">
+ <html>
+ <STYLE type="text/css">
+ @import "tests.css";
+ </STYLE>
+ <head>
+ <script type="text/javascript" src="jquery.min.js"/>
+ </head>
+ <body>
+ <div id="testcasepage">
+ <div id="title">
+ <table>
+ <tr>
+ <td>
+ <h1>Test Report</h1>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id="device">
+ <table>
+ <tr>
+ <th colspan="2">Device Information</th>
+ </tr>
+ <tr>
+ <td>Device Name</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@device_name">
+ <xsl:if test="test_definition/environment/@device_name = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@device_name"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>Device Model</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@device_model">
+ <xsl:if test="test_definition/environment/@device_model = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@device_model"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>OS Version</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@os_version">
+ <xsl:if test="test_definition/environment/@os_version = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@os_version"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>Device ID</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@device_id">
+ <xsl:if test="test_definition/environment/@device_id = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@device_id"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>Firmware Version</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@firmware_version">
+ <xsl:if test="test_definition/environment/@firmware_version = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@firmware_version"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>Build ID</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@build_id">
+ <xsl:if test="test_definition/environment/@build_id = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@build_id"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>Screen Size</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@screen_size">
+ <xsl:if test="test_definition/environment/@screen_size = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@screen_size"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>Resolution</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@resolution">
+ <xsl:if test="test_definition/environment/@resolution = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@resolution"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>Host Info</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@host">
+ <xsl:if test="test_definition/environment/@host = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@host"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>CTS Version</td>
+ <td>
+ <xsl:choose>
+ <xsl:when test="test_definition/environment/@cts_version">
+ <xsl:if test="test_definition/environment/@cts_version = ''">
+ N/A
+ </xsl:if>
+ <xsl:value-of select="test_definition/environment/@cts_version"/>
+ </xsl:when>
+ <xsl:otherwise>
+ N/A
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </tr>
+ <tr>
+ <td>Others</td>
+ <td>
+ <xsl:if test="test_definition/environment/other = ''">
+ N/A
+ </xsl:if>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="test_definition/environment/other"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id="summary">
+ <table>
+ <tr>
+ <th colspan="2">Test Summary</th>
+ </tr>
+ <tr>
+ <td>Test Plan Name</td>
+ <td>
+ <xsl:value-of select="test_definition/summary/@test_plan_name"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Tests Total</td>
+ <td>
+ <xsl:value-of select="count(test_definition//suite/set/testcase)"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Test Passed</td>
+ <td>
+ <xsl:value-of select="count(test_definition//suite/set/testcase[@result = 'PASS'])"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Test Failed</td>
+ <td>
+ <xsl:value-of select="count(test_definition//suite/set/testcase[@result = 'FAIL'])"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Test Block</td>
+ <td>
+ <xsl:value-of select="count(test_definition//suite/set/testcase[@result = 'BLOCK'])"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Test Not Run</td>
+ <td>
+ <xsl:value-of select="count(test_definition//suite/set/testcase) - count(test_definition//suite/set/testcase[@result = 'PASS']) - count(test_definition//suite/set/testcase[@result = 'FAIL']) - count(test_definition//suite/set/testcase[@result = 'BLOCK'])"/>
+ </td>
+ </tr>
+ <tr>
+ <td>Start time</td>
+ <td>
+ <xsl:value-of select="test_definition/summary/start_at"/>
+ </td>
+ </tr>
+ <tr>
+ <td>End time</td>
+ <td>
+ <xsl:value-of select="test_definition/summary/end_at"/>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div id="suite_summary">
+ <div id="title">
+ <a name="contents"/>
+ <table>
+ <tr>
+ <td class="title">
+ <h1>Test Summary by Suite</h1>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <table>
+ <tr>
+ <th>Suite</th>
+ <th>Passed</th>
+ <th>Failed</th>
+ <th>Blocked</th>
+ <th>Not Run</th>
+ <th>Total</th>
+ </tr>
+ <xsl:for-each select="test_definition/suite">
+ <xsl:sort select="@name"/>
+ <tr>
+ <td>
+ <a>
+ <xsl:attribute name="href">
+ #<xsl:value-of select="@name"/>
+ </xsl:attribute>
+ <xsl:value-of select="@name"/>
+ </a>
+ </td>
+ <td>
+ <xsl:value-of select="count(set//testcase[@result = 'PASS'])"/>
+ </td>
+ <td>
+ <xsl:value-of select="count(set//testcase[@result = 'FAIL'])"/>
+ </td>
+ <td>
+ <xsl:value-of select="count(set//testcase[@result = 'BLOCK'])"/>
+ </td>
+ <td>
+ <xsl:value-of select="count(set//testcase) - count(set//testcase[@result = 'PASS']) - count(set//testcase[@result = 'FAIL']) - count(set//testcase[@result = 'BLOCK'])"/>
+ </td>
+ <td>
+ <xsl:value-of select="count(set//testcase)"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </div>
+ <div id="fail_cases">
+ <div id="title">
+ <table>
+ <tr>
+ <td class="title">
+ <h1 align="center">
+ Test Failures (
+ <xsl:value-of select="count(test_definition/suite/set//testcase[@result = 'FAIL'])"/>
+ )
+ </h1>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <xsl:for-each select="test_definition/suite">
+ <xsl:sort select="@name"/>
+ <div id="btc">
+ <a href="#contents">Back to Contents</a>
+ </div>
+ <div id="suite_title">
+ Test Suite:
+ <xsl:value-of select="@name"/>
+ <a><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></a>
+ </div>
+ <table>
+ <tr>
+ <th>Case_ID</th>
+ <th>Purpose</th>
+ <th>Result</th>
+ <th>Stdout</th>
+ </tr>
+ <xsl:for-each select=".//set">
+ <xsl:sort select="@name"/>
+ <tr>
+ <td colspan="4">
+ Test Set:
+ <xsl:value-of select="@name"/>
+ </td>
+ </tr>
+ <xsl:for-each select=".//testcase">
+ <xsl:sort select="@id"/>
+ <xsl:choose>
+ <xsl:when test="@result">
+ <xsl:if test="@result = 'FAIL'">
+ <tr>
+ <td>
+ <xsl:value-of select="@id"/>
+ </td>
+ <td>
+ <xsl:value-of select="@purpose"/>
+ </td>
+ <td class="red_rate">
+ <xsl:value-of select="@result"/>
+ </td>
+ <td>
+ <xsl:value-of select=".//result_info/stdout"/>
+ <xsl:if test=".//result_info/stdout = ''">
+ N/A
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:if>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:for-each>
+ </table>
+ </xsl:for-each>
+ </div>
+ <div id="cases">
+ <div id="title">
+ <table>
+ <tr>
+ <td class="title">
+ <h1 align="center">Detailed Test Results</h1>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <xsl:for-each select="test_definition/suite">
+ <xsl:sort select="@name"/>
+ <div id="btc">
+ <a href="#contents">Back to Contents</a>
+ </div>
+ <div id="suite_title">
+ Test Suite:
+ <xsl:value-of select="@name"/>
+ <a><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></a>
+ </div>
+ <table>
+ <tr>
+ <th>Case_ID</th>
+ <th>Purpose</th>
+ <th>Result</th>
+ <th>Stdout</th>
+ </tr>
+ <xsl:for-each select=".//set">
+ <xsl:sort select="@name"/>
+ <tr>
+ <td colspan="4">
+ Test Set:
+ <xsl:value-of select="@name"/>
+ </td>
+ </tr>
+ <xsl:for-each select=".//testcase">
+ <xsl:sort select="@id"/>
+ <tr>
+ <td>
+ <xsl:value-of select="@id"/>
+ </td>
+ <td>
+ <xsl:value-of select="@purpose"/>
+ </td>
+ <xsl:choose>
+ <xsl:when test="@result">
+ <xsl:if test="@result = 'FAIL'">
+ <td class="red_rate">
+ <xsl:value-of select="@result"/>
+ </td>
+ </xsl:if>
+ <xsl:if test="@result = 'PASS'">
+ <td class="green_rate">
+ <xsl:value-of select="@result"/>
+ </td>
+ </xsl:if>
+ <xsl:if test="@result = 'BLOCK' ">
+ <td>
+ BLOCK
+ </td>
+ </xsl:if>
+ <xsl:if test="@result != 'BLOCK' and @result != 'FAIL' and @result != 'PASS' ">
+ <td>
+ Not Run
+ </td>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <td>
+ </td>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td>
+ <xsl:value-of select=".//result_info/stdout"/>
+ <xsl:if test=".//result_info/stdout = ''">
+ N/A
+ </xsl:if>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </xsl:for-each>
+ </table>
+ </xsl:for-each>
+ </div>
+ </div>
+ <div id="goTopBtn">
+ <img border="0" src="./back_top.png"/>
+ </div>
+ <script type="text/javascript" src="application.js"/>
+ <script language="javascript" type="text/javascript">
+ $(document).ready(function(){
+ goTopEx();
+ });
+ </script>
+ </body>
+ </html>
+ </xsl:template>
+ <xsl:template name="br-replace">
+ <xsl:param name="word"/>
+ <xsl:variable name="cr">
+ <xsl:text>
+ </xsl:text>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="contains($word,$cr)">
+ <xsl:value-of select="substring-before($word,$cr)"/>
+ <br/>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="substring-after($word,$cr)"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$word"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
--- /dev/null
+@charset "UTF-8";\r
+/* CSS Document */\r
+#testcasepage div,\r
+#testcasepage h1,\r
+#testcasepage p,\r
+#testcasepage table,\r
+#testcasepage tr,\r
+#testcasepage th,\r
+#testcasepage td {\r
+ margin: 0;\r
+ padding: 0;\r
+ border: 0;\r
+ font-weight: inherit;\r
+ font-style: inherit;\r
+ font-size: 0.96em;\r
+ font-family: arial;\r
+ vertical-align: baseline;\r
+}\r
+\r
+#testcasepage p {\r
+ text-align: left;\r
+}\r
+\r
+#suite_title {\r
+ text-align: left;\r
+}\r
+\r
+#btc {\r
+ text-align: right;\r
+}\r
+\r
+#testcasepage table {\r
+ border-collapse: separate;\r
+ border-spacing: 0;\r
+ margin-bottom: 1.4em;\r
+ vertical-align: middle;\r
+}\r
+\r
+#testcasepage th,\r
+#testcasepage td {\r
+ text-align: left;\r
+ font-weight: normal;\r
+ padding: 4px 10px 4px 5px;\r
+ vertical-align: middle;\r
+}\r
+\r
+#cases table {\r
+ width: 101%;\r
+}\r
+\r
+#fail_cases table {\r
+ width: 101%;\r
+}\r
+\r
+#title table {\r
+ width: 101%;\r
+}\r
+\r
+#device table {\r
+ width: 50%;\r
+}\r
+\r
+#summary table {\r
+ width: 50%;\r
+}\r
+\r
+#testcasepage th {\r
+ border-bottom: 1px solid #000;\r
+ background-color: #AAAAAA;\r
+ border-left: 1px solid #000;\r
+ border-top: 1px solid #000;\r
+ color: #000;\r
+ font-weight: bold;\r
+ vertical-align: bottom;\r
+}\r
+\r
+#testcasepage th:last-child,\r
+#testcasepage td:last-child {\r
+ border-right: 1px solid #000;\r
+}\r
+\r
+#testcasepage td {\r
+ border-left: 1px solid;\r
+ font-weight: normal;\r
+ border-bottom: 1px solid;\r
+}\r
+\r
+#testcasepage td.yellow_rate {\r
+ background-color: #ffcc00;\r
+}\r
+\r
+#testcasepage td.green_rate {\r
+ background-color: #33cc33;\r
+}\r
+\r
+#testcasepage td.dgreen_rate {\r
+ background-color: #339933;\r
+}\r
+\r
+#testcasepage td.red_rate {\r
+ background-color: #FF3333;\r
+}\r
+\r
+#title table,\r
+#title tr,\r
+#title td {\r
+ border-left: none;\r
+ border-bottom: none;\r
+ text-align: center;\r
+}\r
+\r
+#title td:last-child {\r
+ border-right: none;\r
+}\r
+\r
+#testcasepage h1 {\r
+ font-size: 2em;\r
+ font-family: Arial, sans-serif;\r
+ font-weight: bold;\r
+ line-height: 1;\r
+ color: #000;\r
+ margin-bottom: 0.75em;\r
+ padding-top: 0.25em;\r
+ font-weight: bold;\r
+}\r
+\r
+#goTopBtn {\r
+ right: 0px;\r
+ bottom: 0px;\r
+ position: fixed; +position: absolute;\r
+ top: expression(parseInt(document.body.scrollTop) + document.body.clientHeight - 40);\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
+<test_definition>
+ <suite category="Tizen WRT Core Spec" name="tct-ext02-wrt-tests">
+ <set name="ConfigExtension" type="js">
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="application-id-exist" priority="P1" purpose="Check that the web runtime is able to identify a valid application id." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Confirm the widget application has a valid ID.</step_desc>
+ <expected>The application ID("wrt2app003.ApplicationIdExist") can be shown.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/wrt_ext_application-id-exist.sh</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Spec" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="application-required-version-support" priority="P1" purpose="Check that the web runtime can install the app which has a required valid version successfully." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that the web runtime can install the app which has a required valid version successfully.</step_desc>
+ <expected>The widget application can work properly</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller application-required-version-support.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Spec" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="setting-install-location-internal-only-no-card" priority="P3" purpose="Check that the widget can be installed when install-location is set at 'internal-only' and external storage is not available." status="approved" type="user_experience">
+ <description>
+ <pre_condition>Make sure there is no memory card inserted into the device.</pre_condition>
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that the widget can be installed when install-location is set at 'internal-only' and external storage is not available</step_desc>
+ <expected>Widget application can be installed.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller setting-install-location-internal-only-no-card.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Spec" interface="0230" section="Widget Configuration Extensions" specification="Configuration extension" usage="true" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="web-applications-with-namespace-xmlns-enable" priority="P2" purpose="Check that the WRT support Web Applications with namespace declared in configuration file." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that the WRT support Web Applications with namespace declared in configuration file</step_desc>
+ <expected>The web-applications-with-namespace-xmlns-enable app can be installed successfully.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller web-applications-with-namespace-xmlns-enable.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Spec" element_name="N/A" element_type="attribute" interface="0200" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="tizen-application-id-is-one-bytes" priority="P2" purpose="Check that web application can be installed when the length of application id is 1 byte." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that web application can be installed when the length of application id is 1 byte</step_desc>
+ <expected>Widget application is installed successfully.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller tizen-application-id-is-one-bytes.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Spec" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="tizen-application-id-is-rightful" priority="P1" purpose="Check that web application with valid id can be installed." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that web application with valid id can be installed.</step_desc>
+ <expected>Widget application is able to be installed successfully.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller tizen-application-id-is-rightful.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Spec" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="tizen-application-id-is-all-right" priority="P0" purpose="Check web application which the length of application id is valid can be installed." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check web application which the length of application id is valid can be installed.</step_desc>
+ <expected>Widget application is able to install successfully.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller tizen-application-id-is-all-right.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Spec" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ </set>
+ </suite>
+</test_definition>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
+<test_definition>
+ <suite category="Tizen WRT Core Spec" name="tct-ext02-wrt-tests">
+ <set name="ConfigExtension" type="script">
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="application-id-exist" priority="P1" purpose="Check that the web runtime is able to identify a valid application id." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Confirm the widget application has a valid ID.</step_desc>
+ <expected>The application ID("wrt2app003.ApplicationIdExist") can be shown.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/wrt_ext_application-id-exist.sh</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Spec" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="application-required-version-support" priority="P1" purpose="Check that the web runtime can install the app which has a required valid version successfully." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that the web runtime can install the app which has a required valid version successfully.</step_desc>
+ <expected>The widget application can work properly</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller application-required-version-support.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Specifications" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="web-applications-with-namespace-xmlns-enable" priority="P2" purpose="Check that the WRT support Web Applications with namespace declared in configuration file." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that the WRT support Web Applications with namespace declared in configuration file</step_desc>
+ <expected>The web-applications-with-namespace-xmlns-enable app can be installed successfully.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller web-applications-with-namespace-xmlns-enable.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Specifications" element_name="N/A" element_type="attribute" interface="0200" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="tizen-application-id-is-one-bytes" priority="P2" purpose="Check that web application can be installed when the length of application id is 1 byte." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that web application can be installed when the length of application id is 1 byte</step_desc>
+ <expected>Widget application is installed successfully.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller tizen-application-id-is-one-bytes.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Specifications" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="tizen-application-id-is-rightful" priority="P1" purpose="Check that web application with valid id can be installed." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that web application with valid id can be installed.</step_desc>
+ <expected>Widget application is able to be installed successfully.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller tizen-application-id-is-rightful.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Specifications" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="tizen-application-id-is-all-right" priority="P0" purpose="Check web application which the length of application id is valid can be installed." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check web application which the length of application id is valid can be installed.</step_desc>
+ <expected>Widget application is able to install successfully.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller tizen-application-id-is-all-right.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Specifications" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="test-hosted-widget-with-invalid-tizencontent" priority="P2" purpose="Check web application which the invalid content can be intall and launched." status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check web application which the content of invalid can be installed.</step_desc>
+ <expected>Widget application is able to install successfully.</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller test-hosted-widget-with-invalid-tizencontent.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Specifications" element_name="N/A" element_type="attribute" interface="0240" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="setting-install-location-internal-only-no-card" priority="P3" purpose="Check that the widget can be installed when install-location is set at 'internal-only' and external storage is not available" status="approved" type="user_experience">
+ <description>
+ <pre_condition />
+ <post_condition />
+ <steps>
+ <step order="1">
+ <step_desc>Check that the widget can be installed when install-location is set at 'internal-only' and external storage is not available</step_desc>
+ <expected>The widget application can not install</expected>
+ </step>
+ </steps>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller setting-install-location-internal-only-no-card.wgt</test_script_entry>
+ </description>
+ <specs>
+ <spec>
+ <spec_assertion category="Tizen WRT Core Specifications" element_name="N/A" element_type="attribute" interface="0210" section="Widget Configuration Extensions" specification="Configuration extension" />
+ <spec_url />
+ <spec_statement>TBD</spec_statement>
+ </spec>
+ </specs>
+ </testcase>
+ </set>
+ </suite>
+</test_definition>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
+<test_definition>
+ <suite category="Tizen WRT Core Spec" name="tct-ext02-wrt-tests">
+ <set name="ConfigExtension" type="script">
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="application-id-exist" priority="P1" purpose="Check that the web runtime is able to identify a valid application id.">
+ <description>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/wrt_ext_application-id-exist.sh</test_script_entry>
+ </description>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="application-required-version-support" priority="P1" purpose="Check that the web runtime can install the app which has a required valid version successfully.">
+ <description>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller application-required-version-support.wgt</test_script_entry>
+ </description>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="web-applications-with-namespace-xmlns-enable" priority="P2" purpose="Check that the WRT support Web Applications with namespace declared in configuration file.">
+ <description>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller web-applications-with-namespace-xmlns-enable.wgt</test_script_entry>
+ </description>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="tizen-application-id-is-one-bytes" priority="P2" purpose="Check that web application can be installed when the length of application id is 1 byte.">
+ <description>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller tizen-application-id-is-one-bytes.wgt</test_script_entry>
+ </description>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="tizen-application-id-is-rightful" priority="P1" purpose="Check that web application with valid id can be installed.">
+ <description>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller tizen-application-id-is-rightful.wgt</test_script_entry>
+ </description>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="tizen-application-id-is-all-right" priority="P0" purpose="Check web application which the length of application id is valid can be installed.">
+ <description>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller tizen-application-id-is-all-right.wgt</test_script_entry>
+ </description>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="test-hosted-widget-with-invalid-tizencontent" priority="P2" purpose="Check web application which the invalid content can be intall and launched.">
+ <description>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller test-hosted-widget-with-invalid-tizencontent.wgt</test_script_entry>
+ </description>
+ </testcase>
+ <testcase component="Tizen WRT Core Spec/Config Extension" execution_type="auto" id="setting-install-location-internal-only-no-card" priority="P3" purpose="Check that the widget can be installed when install-location is set at 'internal-only' and external storage is not available.">
+ <description>
+ <test_script_entry test_script_expected_result="0">owner_user@/home/owner/share/tct/opt/tct-ext02-wrt-tests/scripts/WRTInstaller setting-install-location-internal-only-no-card.wgt</test_script_entry>
+ </description>
+ </testcase>
+ </set>
+ </suite>
+</test_definition>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://tizen.org/tizen-application-id-is-all-right" version="3.0" viewmodes="maximized">
+ <tizen:application id="wrtcofg006.TizenApplicationIdIsAllRight456789012345678901234567" package="wrtcofg006" required_version="3.0"/>
+ <content src="index.html"/>
+ <icon src="icon.png" height="117" width="117"/>
+ <name>tizen-application-id-is-all-right</name>
+</widget>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ kevinx.niu <kevinx.niu@intel.com>
+-->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+ <meta name="description" content="Tizen basic template generated by Tizen Web IDE"/>
+ <title>tizen-application-id-is-all-right</title>
+ <link rel="stylesheet" type="text/css" href="css/style.css"/>
+ <script src="js/main.js"></script>
+ </head>
+ <body>
+ <p>Pass: if you see me.</p>
+ </body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://tizen.org/tizen-application-id-is-one-bytes" version="3.0" viewmodes="maximized">
+ <tizen:application id="wrtcofg009.t" package="wrtcofg009" required_version="3.0"/>
+ <content src="index.html"/>
+ <icon src="icon.png" height="117" width="117"/>
+ <name>tizen-application-id-is-one-bytes</name>
+</widget>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ kevinx.niu <kevinx.niu@intel.com>
+-->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+ <meta name="description" content="Tizen basic template generated by Tizen Web IDE"/>
+ <title>Tizen Web IDE - Tizen - Tizen basic Application</title>
+ <link rel="stylesheet" type="text/css" href="css/style.css"/>
+ <script src="js/main.js"></script>
+ </head>
+ <body>
+ <p>Fail: if you see me</p>
+ </body>
+</html>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://tizen.org/tizen-application-id-is-rightful" version="3.0" viewmodes="maximized">
+ <tizen:application id="wrtcofg005.TizenApplicationIdIsRightful" package="wrtcofg005" required_version="3.0"/>
+ <content src="index.html"/>
+ <icon src="icon.png" height="117" width="117"/>
+ <name>tizen-application-id-is-rightful</name>
+</widget>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ kevinx.niu <kevinx.niu@intel.com>
+-->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+ <meta name="description" content="Tizen basic template generated by Tizen Web IDE"/>
+ <title>tizen-application-id-is-rightful</title>
+ <link rel="stylesheet" type="text/css" href="css/style.css"/>
+ <script src="js/main.js"></script>
+ </head>
+ <body>
+ <p>Pass: is you see me</p>
+ </body>
+</html>
--- /dev/null
+Copyright (c) 2013 Intel Corporation.
+Except as noted, this software is licensed under BSD-3-Clause License.
+Please, see the LICENSE.BSD-3 file for the BSD-3-Clause License.
+
+Following resources are licensed under its own license.
+
+a-green.css,
+CanvasTest.ttf,
+canvas-index.css,
+csstest-basic-bold.ttf:
+from https://github.com/w3c/csswg-test/tree/master/css-masking-1/support/a-green.css
+https://github.com/w3c/web-platform-tests/tree/master/fonts/CanvasTest.ttf
+https://github.com/w3c/web-platform-tests/tree/master/common/canvas-index.css
+https://github.com/w3c/csswg-test/tree/master/fonts/CSSTest/csstest-basic-bold.ttf
+The above files are licensed under the W3C Dual License.
+Please see http://www.w3.org/Consortium/Legal/2008/04-testsuite-copyright
--- /dev/null
+.a { color: green; }
\ No newline at end of file
--- /dev/null
+body {
+ font-size: small;
+ font-family: sans-serif;
+}
+
+a {
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+h3 {
+ display: inline;
+ font-size: medium;
+}
+
+h3 + p {
+ display: inline;
+ margin-left: 0.5em;
+}
+
+li {
+ list-style-type: none;
+}
+
+ul {
+ padding-left: 2em;
+ margin-left: 0;
+}
\ No newline at end of file
--- /dev/null
+pre.prettyprint{padding:5px;font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;margin-bottom:10px;background-color:#eee;overflow:auto;width:auto;width:650px !ie7;padding-bottom:20px !ie7;max-height:600px;}pre.prettyprint{max-height:none\9;}code.prettyprint{font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif;background-color:#eee;}p code.prettyprint{padding:1px 5px 1px 5px;}.str{color:maroon;}.kwd{color:#00008b;}.com{color:gray;}.typ{color:#2b91af;}.lit{color:maroon;}.pun{color:#000;}.pln{color:#000;}.tag{color:maroon;}.atn{color:red;}.atv{color:blue;}.dec{color:purple;}@media print{.str{color:#060;}.kwd{color:#006;font-weight:bold;}.com{color:#600;font-style:italic;}.typ{color:#404;font-weight:bold;}.lit{color:#044;}.pun{color:#440;}.pln{color:#000;}.tag{color:#006;font-weight:bold;}.atn{color:#404;}.atv{color:#060;}}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://tizen.org/web-applications-with-namespace-xmlns-enable" version="3.0" viewmodes="maximized">
+ <tizen:application id="wrtcofg001.WebApplicationsWithNamespaceXmlnsEnable" package="wrtcofg001" required_version="3.0"/>
+ <content src="index.html"/>
+ <icon src="icon.png" height="117" width="117"/>
+ <name>web-applications-with-namespace-xmlns-enable</name>
+</widget>
--- /dev/null
+<!DOCTYPE html>
+<!--
+Copyright (c) 2012 Intel Corporation.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of works must retain the original copyright notice, this list
+ of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the original copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this work without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Authors:
+ kevinx.niu <kevinx.niu@intel.com>
+-->
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+ <meta name="description" content="Tizen basic template generated by Tizen Web IDE"/>
+ <title>web-applications-with-namespace-xmlns-enable</title>
+ <link rel="stylesheet" type="text/css" href="css/style.css"/>
+ <script src="js/main.js"></script>
+ </head>
+ <body>
+ <p>Pass</p>
+ </body>
+</html>