From 79ad2e62d41af8fb06b83e5d566fc509421c8da9 Mon Sep 17 00:00:00 2001 From: Jussi Lind Date: Tue, 17 Aug 2010 14:10:19 +0300 Subject: [PATCH 1/4] Changes: Changed the order of provide and request in applauncherd-launcher.aegis --- debian/applauncherd-launcher.aegis | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/debian/applauncherd-launcher.aegis b/debian/applauncherd-launcher.aegis index de8d7cd..47550bb 100644 --- a/debian/applauncherd-launcher.aegis +++ b/debian/applauncherd-launcher.aegis @@ -1,4 +1,7 @@ + + + @@ -12,10 +15,5 @@ - - - - - From aaf3c3895c6fb8636b8e590dd069a86297ca5dfb Mon Sep 17 00:00:00 2001 From: Nimika Keshri Date: Tue, 17 Aug 2010 15:45:54 +0300 Subject: [PATCH 2/4] Changes: Changelog updated RevBy: TrustMe --- debian/changelog | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index b026c7c..fbeda0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +applauncherd (0.10.2) stable; urgency=low + + * Changes: close connection with invoker if --wait-term param is not used + * Changes: Replaced references to Matti with TDriver + * Changes: sending application exit status to invoker stubs, code refactoring + * Changes: return application's exit status to invoker + * Changes: Changed the order of provide and request in applauncherd-launcher.aegis + + -- Nimika Keshri Tue, 17 Aug 2010 15:41:40 +0300 + applauncherd (0.10.1) stable; urgency=low * Fixes: NB#184761 - Application launched with applauncher does not generate core dumps From 8ddc08cf300f87daa1d67644b18bdbce55be560e Mon Sep 17 00:00:00 2001 From: Nimika Keshri Date: Wed, 18 Aug 2010 08:59:01 +0300 Subject: [PATCH 3/4] Changes: Test and test application added to check that invoker returns the exit status of application RevBy: TrustMe --- debian/applauncherd-testapps.install | 1 + tests/CMakeLists.txt | 3 ++ tests/TestApps/fala_status/CMakeLists.txt | 32 ++++++++++++++++++ tests/TestApps/fala_status/fala_status.cpp | 39 ++++++++++++++++++++++ tests/TestScripts/test-func-launcher.py | 15 +++++++++ tests/bug-tests/tests.xml | 5 +++ 6 files changed, 95 insertions(+) create mode 100644 tests/TestApps/fala_status/CMakeLists.txt create mode 100644 tests/TestApps/fala_status/fala_status.cpp diff --git a/debian/applauncherd-testapps.install b/debian/applauncherd-testapps.install index 1a6c2ab..75aa368 100644 --- a/debian/applauncherd-testapps.install +++ b/debian/applauncherd-testapps.install @@ -1,4 +1,5 @@ usr/bin/fala_ft_hello +usr/bin/fala_status.launch usr/bin/fala_ft_hello1 usr/bin/fala_ft_hello2 usr/bin/fala_ft_hello.launch diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 25dc840..dc255b2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -43,3 +43,6 @@ add_subdirectory(TestApps/testapp) # Sub build: TestApps add_subdirectory(TestApps/themetest) + +# Sub build: TestApps +add_subdirectory(TestApps/fala_status) diff --git a/tests/TestApps/fala_status/CMakeLists.txt b/tests/TestApps/fala_status/CMakeLists.txt new file mode 100644 index 0000000..267339c --- /dev/null +++ b/tests/TestApps/fala_status/CMakeLists.txt @@ -0,0 +1,32 @@ +# Set sources +set(SRC fala_status.cpp) + +link_libraries(${MEEGOTOUCH_LIBRARIES}) + +include(${QT_USE_FILE}) + +# Use the compiler and linker flags given in meegotouch-boostable.pc +# in the source tree. +execute_process(COMMAND "env" + "PKG_CONFIG_PATH=${CMAKE_SOURCE_DIR}/data/pkgconfig" + "/usr/bin/pkg-config" + "--cflags" + "meegotouch-boostable" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE booster_cflags + OUTPUT_STRIP_TRAILING_WHITESPACE) +execute_process(COMMAND "env" + "PKG_CONFIG_PATH=${CMAKE_SOURCE_DIR}/data/pkgconfig" + "/usr/bin/pkg-config" "--libs" + "meegotouch-boostable" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE booster_libs + OUTPUT_STRIP_TRAILING_WHITESPACE) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${booster_cflags}") +set(CMAKE_EXE_LINKER_FLAGS ${booster_libs}) + +add_executable(fala_status ${SRC}) + +# Install +install(PROGRAMS fala_status DESTINATION /usr/bin RENAME fala_status.launch) + diff --git a/tests/TestApps/fala_status/fala_status.cpp b/tests/TestApps/fala_status/fala_status.cpp new file mode 100644 index 0000000..02efeef --- /dev/null +++ b/tests/TestApps/fala_status/fala_status.cpp @@ -0,0 +1,39 @@ +/*************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (directui@nokia.com) +** +** This file is part of applauncherd +** +** If you have questions regarding the use of this file, please contact +** Nokia at directui@nokia.com. +** +** This library is free software; you can redistribute it and/or +** modify it under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation +** and appearing in the file LICENSE.LGPL included in the packaging +** of this file. +** +****************************************************************************/ + +#include +#include +#include +#include +#include + +#ifdef HAVE_MCOMPONENTCACHE +#include +#endif + +M_EXPORT int main(int argc, char ** argv) +{ +#ifdef HAVE_MCOMPONENTCACHE + MApplication *app = MComponentCache::mApplication(argc, argv); +#endif + QTimer::singleShot(5, app, SLOT(quit())); + app->exec(); + return 29; + +} diff --git a/tests/TestScripts/test-func-launcher.py b/tests/TestScripts/test-func-launcher.py index c4a8e04..4328b84 100644 --- a/tests/TestScripts/test-func-launcher.py +++ b/tests/TestScripts/test-func-launcher.py @@ -631,6 +631,21 @@ class launcher_tests (unittest.TestCase): self.assert_(mpid_new != None, "No booster process running") self.assert_(mpid_new != mpid, "booster process was not killed") + def test_017_invoker_exit_status(self): + """ + To test that invoker returns the same exit status as the application + """ + #Run application without invoker and get the exit status + st, op = commands.getstatusoutput('/usr/bin/fala_status.launch') + app_st_wo_inv = os.WEXITSTATUS(st) + + #Run application with invoker and get the exit status + st, op = commands.getstatusoutput('invoker --type=m --wait-term /usr/bin/fala_status.launch') + app_st_w_inv = os.WEXITSTATUS(st) + + self.assert_(app_st_wo_inv == app_st_w_inv, "The invoker returns a wrong exit status") + + # main if __name__ == '__main__': diff --git a/tests/bug-tests/tests.xml b/tests/bug-tests/tests.xml index 79b3ec4..9280a94 100644 --- a/tests/bug-tests/tests.xml +++ b/tests/bug-tests/tests.xml @@ -65,6 +65,11 @@ source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_010 + + source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_017_invoker_exit_status + + + true true From 90b6c3c2e289f00907d750eb8b2e031be2c0b218 Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Wed, 18 Aug 2010 12:52:57 +0300 Subject: [PATCH 4/4] Changes: Request all POSIX capabilities for applauncherd, fix #180963 --- debian/applauncherd-launcher.aegis | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/debian/applauncherd-launcher.aegis b/debian/applauncherd-launcher.aegis index 47550bb..0877863 100644 --- a/debian/applauncherd-launcher.aegis +++ b/debian/applauncherd-launcher.aegis @@ -4,11 +4,7 @@ - - - - - +