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 5c878c6464ceb3be369e27e221d4d70730950d23..9567ec8f09eaeb70b96e07a3ce8d62639c34848f 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 205211e6ea36bb41d920283caf10fe2b45bba2c5..b34130788d2c0551aaa3956b26e9de9ccf377402 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 25991a5444928a45259af2b67a2c6bcd9355c796..6bb3752947f35c8bdd565909fad660c15a9dff65 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 a552164c82f96fea6a28db4663513b0a9b21a4f1..dc6ce65ba732972569b888106df7ae09f71de79c 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 97ad3f398e8a64fcb372259717ffbfad9e8edfb4..b1a2574c9c2a65fc3ff3a887490e0919b4529d76 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 2d91657ec7aadd68bba8b7e93d9116a2beb1ea4f..6ea9162d60a755fe1500073369bb69a3604c29de 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 907a396b58033a0fc2d7aada1af3139676129a3f..3a281ae27b013b1cbd1b0d438a36205f315abf4a 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 72ccd3240472e08d33cde41e88684b06fd32f262..8c1cb0bf3089fb866934b00c55248fcfeed9284d 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 12584ad14fc2fbb85aa9a7b6e90de2504c309c06..b58ac79e218377d318a7503681196db16770680f 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 9f65ea9ea0d529a24c3dea246363104a5c906585..1586dcec162508e3b45ec98b9ba9addc0784d232 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 28f6070b319a439a46f10580ac2d6e2fa0386202..2458887e3d0e05f2e3fa3f18aa221ae248fd4263 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 8c4fee6d0cc7f17dc141b3d096d51f21d0c60d03..450c8b75dcb29a8ef958e8f24b7ee00f4973924a 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 96ecdc7b92c09e067b1280a415d958cb84b838ac..6971df47c47fd1041f7bae1df900c8a2dcb65977 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 471250f9e60b50d16c69cf0798bc3efc7cc833d9..521ebde32b1858e959c775e8f5deb0152d37f616 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 80c2a279f8de13db052776ccb0ed47f39274e73b..b70840b8a7a1d43ef325fc65419ff9e04816cda7 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 0d21550ec451c612062a387220907fd54b9a2bb0..c0241283758bf82f021294275ad68f8498463b05 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 be80897e21e09c57d1e7f280ac976f77c2fbd1c7..9f8ac1decfbd4fa44c88f4db71186dbfd3a19e35 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 65d5b245647213446320779a608a9e1b899b9af9..48536aa78dc4283096e0063d8fdbaf69ba7fc65d 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 e6199839d78ad6faeeecd7fae94992112657e544..5a462d887fb741f72c286f6532403ce0a4d29945 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 0cafaadd2a92c55f62ce08abfce62d8acd301122..7fbb07f87da1983d6cf772f23690a0f9715b226a 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 f15427abc1709c3adfbaaa9c5e18a082c72ac1a5..cd923a41c13b27d824a64faaf5902945271a9513 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 b360a3fc8e00918b302a722f2feca76c84fbe64a..7d0d2134f1a10989e1a1293b25699a04e49b59d9 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 05915206171abfa0b76e370f297c2726df476c2a..3babd1fd2d35d7e605c584aa58b641945ddc9ff0 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 c88a679c3a7be05ef4d233b628d9b0a8cd8aa992..4f3fc0b5c2faed5bf5878aaf0661dbebe3cc2df5 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 b11612591fbfe17b604452300479a7c37b1c4e9b..b8d00ebd57ddd67812df83e87bb90291cc13fcf4 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 7c6dc855df6e49704893d2ffabc7132fe574a124..ed22ef256ba71da156f2f8717ba0c226e3ef97a2 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 ffe40191ef42c23495864adcea1663df62562301..2d1f32736652d1402037c5195b8cb1c2dd0fdf76 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 63a4c61c8f1e9d5bdd5570dc9215e65d60e088cc..cc6aac45e2ff341d28b0435f56d2dfea435939a3 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 6ca25b532ae54993a603db648a5a39a5a974279e..1339fdfa9023de35a47da431c9d1810116cb0c87 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 90f5086f0070dcc1c60a64a930c4b6e2704e3ac6..9b44e0e38ce2a5729806917b3865e3605eb3b7ba 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>