sync codes for tizen_tct_2.2.1
authorchengtao.liu <chengtaox.liu@intel.com>
Mon, 10 Feb 2014 10:06:14 +0000 (18:06 +0800)
committerchengtao.liu <chengtaox.liu@intel.com>
Mon, 10 Feb 2014 10:06:14 +0000 (18:06 +0800)
31 files changed:
VERSION
commodule/Makefile.am
commodule/autoexec.py
commodule/connector.py
commodule/httprequest.py
commodule/impl/Makefile.am
commodule/impl/androidmobile.py
commodule/impl/localhost.py
commodule/impl/tizenmobile.py
commodule/impl/tizenpc.py
commodule/killall.py
commodule/log.py
commodule/str2.py
debian/changelog
debian/rules [changed mode: 0755->0644]
doc/Makefile.am
packaging/testkit-lite.spec
setup.py
testkit-lite
testkitlite/Makefile.am
testkitlite/common/Makefile.am
testkitlite/common/process_killall.py
testkitlite/engines/Makefile.am
testkitlite/engines/default/Makefile.am
testkitlite/engines/default/runner.py
testkitlite/engines/default/worker.py
web/Makefile.am
web/index.html
web/manual_harness.html
web/manualharness.html
xsd/Makefile.am

diff --git a/VERSION b/VERSION
index 5c878c6..9567ec8 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,4 +1,4 @@
 [public_version]
-version=2.3.20
+version=2.3.22
 [internal_version]
-version=2.3.20
+version=2.3.22
index 205211e..b341307 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Yuanyuan,Zou  <zouyuanx@intel.com>
 
index 25991a5..6bb3752 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Liu,chengtao <chengtaox.liu@intel.com>
 """ The shell command executor module"""
index a552164..dc6ce65 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor,Boston, MA 02110-1301,USA.
-#
 # Authors:
 #              Liu,chengtao <chengtaox.liu@intel.com>
 """Test connector for test instance and target instance"""
index 97ad3f3..b1a2574 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA  02110-1301, USA.
-#
 # Authors:
 #           Liu,chengtao <chengtaox.liu@intel.com>
 """ The http request process module"""
index 2d91657..6ea9162 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Yuanyuan,Zou  <zouyuanx@intel.com>
 
index 907a396..3a281ae 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA  02110-1301, USA.
-#
 # Authors:
 #           Chengtao,Liu  <chengtaox.liu@intel.com>
 
@@ -98,14 +93,15 @@ class AndroidMobile:
 
     def launch_stub(self, stub_app, stub_port="8000", debug_opt=""):
         wgt_name = "testkit.stub/.TestkitStub"
-        blauched = True
         pkg_name = wgt_name.split('/')[0]
         cmdline = APP_STOP % (self.deviceid, pkg_name)
         exit_code, ret = shell_command(cmdline)
         cmdline = APP_START % (self.deviceid, wgt_name)
-        exit_code, ret = shell_command(cmdline)
+        debug_ext = " -e debug on" if debug_opt != "" else " -e debug off"
+        port_ext = " -e port " + stub_port
+        exit_code, ret = shell_command(cmdline + port_ext + debug_ext)
         time.sleep(2)
-        return blauched
+        return True
 
     def shell_cmd_ext(self,
                       cmd="",
index 72ccd32..8c1cb0b 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA  02110-1301, USA.
-#
 # Authors:
 #           Liu,chengtao <chengtaox.liu@intel.com>
 
index 12584ad..b58ac79 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA  02110-1301, USA.
-#
 # Authors:
 #           Chengtao,Liu  <chengtaox.liu@intel.com>
 
@@ -41,7 +36,7 @@ RPM_LIST = "sdb -s %s shell \"rpm -qa|grep tct\""
 APP_QUERY_STR = "sdb -s %s shell \"ps aux|grep '%s'|grep -v grep\"|awk '{print $2}'"
 APP_KILL_STR = "sdb -s %s shell kill -9 %s"
 WRT_QUERY_STR = "sdb -s %s shell wrt-launcher -l | grep '%s'|awk '{print $2\":\"$NF}'"
-WRT_START_STR = "sdb -s %s shell wrt-launcher -s %s"
+WRT_START_STR = "sdb -s %s shell 'wrt-launcher -s %s; echo returncode=$?'"
 WRT_STOP_STR = "sdb -s %s shell wrt-launcher -k %s"
 WRT_INSTALL_STR = "sdb -s %s shell wrt-installer -i %s"
 WRT_UNINSTL_STR = "sdb -s %s shell wrt-installer -un %s"
@@ -330,8 +325,8 @@ class TizenMobile:
         exit_code, ret = shell_command(cmdline)
         cmdline = WRT_START_STR % (self.deviceid, wgt_name)
         while timecnt < 3:
-            exit_code, ret = shell_command(cmdline)
-            if len(ret) > 0 and ret[0].find('launched') != -1:
+            exit_code, ret_out, ret_err = shell_command_ext(cmdline, 30)
+            if exit_code == "0":
                 blauched = True
                 break
             timecnt += 1
index 9f65ea9..1586dce 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA  02110-1301, USA.
-#
 # Authors:
 #           Chengtao,Liu  <chengtaox.liu@intel.com>
 
index 28f6070..2458887 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA  02110 - 1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index 8c4fee6..450c8b7 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor,
-# Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Liu,chengtao <liux.chengtao@intel.com>
 """General Implementation"""
index 96ecdc7..6971df4 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index 471250f..521ebde 100644 (file)
@@ -1,4 +1,4 @@
-testkit-lite (2.3.20) unstable; urgency=low
+testkit-lite (2.3.22) unstable; urgency=low
 
   * TCT2.2.1 Release.
 
old mode 100755 (executable)
new mode 100644 (file)
index 80c2a27..b70840b 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index 0d21550..c024128 100644 (file)
@@ -1,6 +1,6 @@
 Summary: TCT-Lite
 Name: testkit-lite
-Version: 2.3.20
+Version: 2.3.22
 Release: 1
 License: GPLv2
 Group: Applications/System
index be80897..9f8ac1d 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,4 +1,20 @@
 #!/usr/bin/python
+#
+# Copyright (C) 2012 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# Authors:
+#              Jing,Wang  <jing.j.wang@intel.com>
+#              Yuanyuan,Zou  <zouyuanx@intel.com>
 
 from setuptools import setup, find_packages
 
@@ -8,10 +24,10 @@ setup(
     url = "https://github.com/testkit/testkit-lite",
     author = "Cathy Shen",
     author_email = "cathy.shen@intel.com",
-    version = "2.3.20",
+    version = "2.3.22",
     include_package_data = True,
     data_files = [('/opt/testkit/lite/',
-                 ('VERSION', 'doc/testkit-lite_user_guide_for_tct.pdf'))],
+              ('VERSION', 'doc/testkit-lite_user_guide_for_tct.pdf'))],
     scripts = ('testkit-lite',),
     packages = find_packages(),
 )
index 65d5b24..48536aa 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-# USA.
-#
 # Authors:
 #              Jing,Wang  <jing.j.wang@intel.com>
 #              Yuanyuan,Zou  <zouyuanx@intel.com>
index e619983..5a462d8 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index 0cafaad..7fbb07f 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index f15427a..cd923a4 100755 (executable)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index b360a3f..7d0d213 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index 0591520..3babd1f 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index c88a679..4f3fc0b 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc.,
-# 51 Franklin Street,
-# Fifth Floor,
-# Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index b116125..b8d00eb 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA  02110-1301, USA.
-#
 # Authors:
 #           Chengtao,Liu  <chengtaox.liu@intel.com>
 """ The implementation test worker"""
@@ -35,7 +30,8 @@ from commodule.httprequest import get_url, http_request
 
 CNT_RETRY = 10
 DATE_FORMAT_STR = "%Y-%m-%d %H:%M:%S"
-UIFW_MAX_TIME = 600
+UIFW_MAX_TIME = 300
+UIFW_MAX_WRITE_TIME = 10
 UIFW_RESULT = "/opt/usr/media/Documents/tcresult"
 UIFW_SET_NUM = 0
 LAUNCH_ERROR = 1
@@ -304,6 +300,7 @@ def _webuifw_test_exec(conn, test_web_app, test_session, test_set_name, exetype,
     result_obj.set_status(0)
     result_obj.set_result({"resultfile": ""})
     ls_cmd = "ls -l %s" % set_UIFW_RESULT
+    sz_cmd = "du -hk %s " % set_UIFW_RESULT
     time_out = UIFW_MAX_TIME
     rm_cmd = "rm /opt/usr/media/Documents/tcresult*.xml"
 
@@ -322,10 +319,13 @@ def _webuifw_test_exec(conn, test_web_app, test_session, test_set_name, exetype,
     while time_out > 0:
         LOGGER.info('[webuifw] waiting for test completed...')
         exit_code, ret = conn.shell_cmd(ls_cmd)
-        if 'No such file or directory' in ret[0]:
-            continue
-        else:
-            break
+        if not 'No such file or directory' in ret[0]:
+            exit_code, ret = conn.shell_cmd(sz_cmd)
+            f_size = int(ret[0].split("\t")[0])
+            if f_size > 0:
+                break
+            if time_out > UIFW_MAX_WRITE_TIME:
+                time_out = UIFW_MAX_WRITE_TIME
         time.sleep(2)
         time_out -= 2
 
index 7c6dc85..ed22ef2 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index ffe4019..2d1f327 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Wang, Jing <jing.j.wang@intel.com>
 #              Tang, Shaofeng  <shaofeng.tang@intel.com>
index 63a4c61..cc6aac4 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index 6ca25b5..1339fdf 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>
index 90f5086..9b44e0e 100644 (file)
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
 # Authors:
 #              Zhang, Huihui <huihuix.zhang@intel.com>
 #              Wendong,Sui  <weidongx.sun@intel.com>