From 48b4c1e333652cb1a084560a994dfd6bb6943699 Mon Sep 17 00:00:00 2001 From: Nimika Keshri Date: Wed, 13 Apr 2011 13:03:04 +0300 Subject: [PATCH] Changes: Fixing the failing test test_daemon RevBy: TrustMe --- tests/harmattan/testscripts/test-func-launcher.py | 9 ++++----- tests/harmattan/testscripts/utils.py | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/harmattan/testscripts/test-func-launcher.py b/tests/harmattan/testscripts/test-func-launcher.py index 9b77b9b..95ae314 100644 --- a/tests/harmattan/testscripts/test-func-launcher.py +++ b/tests/harmattan/testscripts/test-func-launcher.py @@ -325,16 +325,14 @@ class launcher_tests (unittest.TestCase): stop_applauncherd() - # and for the fun of it let's do it again - commands.getstatusoutput("pkill applauncherd") - remove_applauncherd_runtime_files() p = run_cmd_as_user('/usr/bin/applauncherd.bin --daemon') - time.sleep(10) + time.sleep(5) st, op = commands.getstatusoutput('pgrep -lf "applauncherd.bin --daemon"') + p_id = op.split(" ")[0] debug("The pid of applauncherd --daemon is %s" %op) # filter some cruft out from the output and see how many @@ -358,7 +356,8 @@ class launcher_tests (unittest.TestCase): self.assert_(False, "fala_ft_hello was not launched!") # only the daemonized applauncherd should be running now - commands.getstatusoutput('pkill applauncherd') + kill_process(apppid = p_id) + #commands.getstatusoutput('pkill applauncherd') remove_applauncherd_runtime_files() diff --git a/tests/harmattan/testscripts/utils.py b/tests/harmattan/testscripts/utils.py index 975fb99..bad0c4c 100644 --- a/tests/harmattan/testscripts/utils.py +++ b/tests/harmattan/testscripts/utils.py @@ -45,7 +45,7 @@ def start_applauncherd(): stdout = DEV_NULL, stderr = DEV_NULL, shell = False) - time.sleep(4) + time.sleep(6) return handle.wait() == 0 def stop_applauncherd():