From 163fede172611eb1c0cf18b701df672f6778c345 Mon Sep 17 00:00:00 2001 From: sui wendong Date: Thu, 20 Dec 2012 15:37:36 +0800 Subject: [PATCH] update widget kill regular expression --- ChangeLog | 3 +++ testkit-lite | 2 +- testkit-lite.spec | 2 +- testkitlite/engines/default/runner.py | 7 +++++-- testkitlite/engines/default/testkithttpd.py | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 44ab47c..5dcd672 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ + Tue Dec 20 2012 Zhang Huihui 2.2.9-2 + - update widget kill regular expression + - add error message for -o option when the file doesn't exist Tue Dec 17 2012 Zhang Huihui 2.2.9-1 - add feature to set the result of core manual cases from the console Tue Dec 12 2012 Zhang Huihui 2.2.8-3 diff --git a/testkit-lite b/testkit-lite index 470dfdf..a1164c0 100755 --- a/testkit-lite +++ b/testkit-lite @@ -96,7 +96,7 @@ except Exception, e: # detect version option if "--version" in sys.argv: - print "[ testkit-lite v2.2.9-1 ]" + print "[ testkit-lite v2.2.9-2 ]" sys.exit(1) # get test engine, now we only got default engine diff --git a/testkit-lite.spec b/testkit-lite.spec index 0385988..13017b4 100644 --- a/testkit-lite.spec +++ b/testkit-lite.spec @@ -3,7 +3,7 @@ Summary: Testkit Lite Name: testkit-lite Version: 2.2.9 -Release: 1 +Release: 2 License: GPLv2 Group: System/Libraries Source: %name-%version.tar.gz diff --git a/testkitlite/engines/default/runner.py b/testkitlite/engines/default/runner.py index 36cd768..64c7aa2 100644 --- a/testkitlite/engines/default/runner.py +++ b/testkitlite/engines/default/runner.py @@ -452,8 +452,11 @@ class TRunner: # change <![CDATA[]]> to self.replace_cdata(mergefile) - if self.resultfile: - copyfile(mergefile, self.resultfile) + try: + if self.resultfile: + copyfile(mergefile, self.resultfile) + except Exception, e: + print "[ Error: fail to copy the result file to: %s, please check if you have created its parent directory, error: %s ]" % (self.resultfile, e) def get_device_info(self): device_info = {} diff --git a/testkitlite/engines/default/testkithttpd.py b/testkitlite/engines/default/testkithttpd.py index c62588f..53d94f6 100644 --- a/testkitlite/engines/default/testkithttpd.py +++ b/testkitlite/engines/default/testkithttpd.py @@ -208,7 +208,7 @@ def killAllWidget(): pid_cmd = "ps aux | grep %s | sed -n '1,1p'" % package_id fi_pid, fo_pid, fe_pid = os.popen3(pid_cmd) for line_pid in fo_pid.readlines(): - pattern_pid = re.compile('app\s*(\d*)\s*') + pattern_pid = re.compile('app\s*(\d+)\s*') match_pid = pattern_pid.search(line_pid) if match_pid: widget_pid = match_pid.group(1) -- 2.7.4