diff --git a/debian/changelog b/debian/changelog
index 5629005..f878c62 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
applauncherd (0.30.1) unstable; urgency=low
+ * Changes: New functional tests added to check testability library is loaded by booster-m and booster-d
* Changes: Deprecate MDeclarativeCache::applicationDirPath() and MDeclarativeCache::applicationFilePath().
* Changes: Modify test applications to use _exit().
diff --git a/tests/harmattan/functests/tests.xml b/tests/harmattan/functests/tests.xml
index 07d4af6..6656a62 100644
--- a/tests/harmattan/functests/tests.xml
+++ b/tests/harmattan/functests/tests.xml
@@ -146,6 +146,22 @@
source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_theming.rb name test_theme_change_booster_restart
+
+ source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_booster_d
+
+
+
+ source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_env_booster_d
+
+
+
+ source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_booster_m
+
+
+
+ source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_qttas_load_env_booster_m
+
+
source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py start_daemons
diff --git a/tests/harmattan/testscripts/test-func-launcher.py b/tests/harmattan/testscripts/test-func-launcher.py
index fe1861c..13ae6bd 100644
--- a/tests/harmattan/testscripts/test-func-launcher.py
+++ b/tests/harmattan/testscripts/test-func-launcher.py
@@ -963,6 +963,130 @@ class launcher_tests (unittest.TestCase):
debug("The value of output is %s" %op)
self.assert_(st != 0, "applauncherd has writable and executable memory")
+ def test_qttas_load_booster_d(self):
+ """
+ To test invoker that qttestability plugin is loaded with -testability argument for booster-d
+ """
+ for i in range(2):
+ debug("Running cycle %s" %i)
+ testapp = PREFERED_APP_QML
+ p = run_app_as_user_with_invoker("%s -testability" %testapp, booster = 'd')
+ time.sleep(2)
+
+ pid = get_pid(testapp)
+ self.assert_(pid != None, "Can't start application %s" %testapp)
+
+ st_tas, op_tas = commands.getstatusoutput("grep -c libtestability.so /proc/%s/maps" %pid)
+ debug("The value of status is %d" %st_tas)
+ debug("The value of output is %s" %op_tas)
+
+ st_tas_plug, op_tas_plug = commands.getstatusoutput("grep -c libqttestability.so /proc/%s/maps" %pid)
+ debug("The value of status is %d" %st_tas_plug)
+ debug("The value of output is %s" %op_tas_plug)
+
+ kill_process(apppid=pid)
+
+ self.assert_(st_tas == 0,"libtestability.so not loaded")
+ self.assert_(st_tas_plug == 0,"libqttestability.so not loaded")
+
+ time.sleep(2)
+
+ def test_qttas_load_booster_m(self):
+ """
+ To test invoker that qttestability plugin is loaded with -testability argument for booster-m
+ """
+ for i in range(2):
+ debug("Running cycle %s" %i)
+ testapp = PREFERED_APP
+ p = run_app_as_user_with_invoker("%s -testability" %testapp, booster = 'm')
+ time.sleep(2)
+
+ pid = get_pid(testapp)
+ self.assert_(pid != None, "Can't start application %s" %testapp)
+
+ st_tas, op_tas = commands.getstatusoutput("grep -c libtestability.so /proc/%s/maps" %pid)
+ debug("The value of status is %d" %st_tas)
+ debug("The value of output is %s" %op_tas)
+
+ st_tas_plug, op_tas_plug = commands.getstatusoutput("grep -c libqttestability.so /proc/%s/maps" %pid)
+ debug("The value of status is %d" %st_tas_plug)
+ debug("The value of output is %s" %op_tas_plug)
+
+ kill_process(apppid=pid)
+
+ self.assert_(st_tas == 0,"libtestability.so not loaded")
+ self.assert_(st_tas_plug == 0,"libqttestability.so not loaded")
+
+ time.sleep(2)
+
+ def test_qttas_load_env_booster_d(self):
+ """
+ To test invoker that qttestability plugin is loaded with QT_LOAD_TESTABILITY env variable for booster-d
+ """
+ for i in range(2):
+ debug("Running cycle %s" %i)
+ testapp = PREFERED_APP_QML
+ cmd = ['su', '-', 'user', '-c']
+ invoke="export QT_LOAD_TESTABILITY=1; /usr/bin/invoker --type=d %s" %testapp
+ cmd.append(invoke)
+
+ p = subprocess.Popen(cmd, shell = False, stdout = DEV_NULL, stderr = DEV_NULL)
+
+ time.sleep(2)
+
+ pid = get_pid(testapp)
+ self.assert_(pid != None, "Can't start application %s" %testapp)
+
+ st_tas, op_tas = commands.getstatusoutput("grep -c libtestability.so /proc/%s/maps" %pid)
+ debug("The value of status is %d" %st_tas)
+ debug("The value of output is %s" %op_tas)
+
+ st_tas_plug, op_tas_plug = commands.getstatusoutput("grep -c libqttestability.so /proc/%s/maps" %pid)
+ debug("The value of status is %d" %st_tas_plug)
+ debug("The value of output is %s" %op_tas_plug)
+
+ kill_process(apppid=pid)
+
+ self.assert_(st_tas == 0,"libtestability.so not loaded")
+ self.assert_(st_tas_plug == 0,"libqttestability.so not loaded")
+
+ time.sleep(2)
+
+
+ def test_qttas_load_env_booster_m(self):
+ """
+ To test invoker that qttestability plugin is loaded with QT_LOAD_TESTABILITY env variable for booster-m
+ """
+ for i in range(2):
+ debug("Running cycle %s" %i)
+ testapp = PREFERED_APP
+ cmd = ['su', '-', 'user', '-c']
+ invoke="export QT_LOAD_TESTABILITY=1; /usr/bin/invoker --type=m %s" %testapp
+ cmd.append(invoke)
+
+ p = subprocess.Popen(cmd, shell = False, stdout = DEV_NULL, stderr = DEV_NULL)
+
+ time.sleep(2)
+
+ pid = get_pid(testapp)
+ self.assert_(pid != None, "Can't start application %s" %testapp)
+
+ st_tas, op_tas = commands.getstatusoutput("grep -c libtestability.so /proc/%s/maps" %pid)
+ debug("The value of status is %d" %st_tas)
+ debug("The value of output is %s" %op_tas)
+
+ st_tas_plug, op_tas_plug = commands.getstatusoutput("grep -c libqttestability.so /proc/%s/maps" %pid)
+ debug("The value of status is %d" %st_tas_plug)
+ debug("The value of output is %s" %op_tas_plug)
+
+ kill_process(apppid=pid)
+
+ self.assert_(st_tas == 0,"libtestability.so not loaded")
+ self.assert_(st_tas_plug == 0,"libqttestability.so not loaded")
+
+ time.sleep(2)
+
+
# main
if __name__ == '__main__':
# When run with testrunner, for some reason the PATH doesn't include