From c350cfa520621ad5cd7c7a71cf2f48f260874da1 Mon Sep 17 00:00:00 2001 From: Nimika Keshri Date: Mon, 24 Jan 2011 10:29:36 +0200 Subject: [PATCH] Changes: Broken tests Fixed RevBy: Antti Kervinen Details: 1. Test launch_wo_applauncherd fixed. Now the applications cannot be launched if applauncherd is not running. 2. One of the unit test is started as user. --- tests/Common/unittests/tests.xml | 2 +- tests/Harmattan/TestScripts/test-func-launcher.py | 9 ++++----- tests/Harmattan/functests/tests.xml | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/Common/unittests/tests.xml b/tests/Common/unittests/tests.xml index cafec26..044c8ea 100644 --- a/tests/Common/unittests/tests.xml +++ b/tests/Common/unittests/tests.xml @@ -39,7 +39,7 @@ - source /tmp/session_bus_address.user && DISPLAY=:0 /usr/share/applauncherd-tests/ut_mbooster + su - user -c 'source /tmp/session_bus_address.user && DISPLAY=:0 /usr/share/applauncherd-tests/ut_mbooster' diff --git a/tests/Harmattan/TestScripts/test-func-launcher.py b/tests/Harmattan/TestScripts/test-func-launcher.py index 7b75395..dc5a863 100644 --- a/tests/Harmattan/TestScripts/test-func-launcher.py +++ b/tests/Harmattan/TestScripts/test-func-launcher.py @@ -459,19 +459,18 @@ class launcher_tests (unittest.TestCase): def test_launch_wo_applauncherd(self): """ - To Test that invoker can launch applications even when the + To Test that invoker cannot launch applications when the applauncherd is not running """ stop_applauncherd() - handle = run_app_as_user('fala_ft_hello') + st, op = commands.getstatusoutput('su - user -c fala_ft_hello') time.sleep(3) pid1 = get_pid('fala_ft_hello') - self.assert_(pid1 != None, "Application wasn't executed") - - kill_process('fala_ft_hello') + self.assert_(pid1 == None, "Application was executed") + self.assert_(op.split('\n')[2] == "invoker: warning: Failed to initiate connect on the socket.", "Application was executed") start_applauncherd() diff --git a/tests/Harmattan/functests/tests.xml b/tests/Harmattan/functests/tests.xml index 2ff009c..8d4bcd5 100644 --- a/tests/Harmattan/functests/tests.xml +++ b/tests/Harmattan/functests/tests.xml @@ -75,7 +75,7 @@ - + source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_wo_applauncherd