Merge branch 'master' of git@gitorious.org:meegotouch/meegotouch-applauncherd

Conflicts:
	tests/Harmattan/perftests/tests.xml
pull/1/head
Olli Leppanen 15 years ago
commit 0384faaf1b

7
debian/changelog vendored

@ -1,3 +1,10 @@
applauncherd (0.15.3) unstable; urgency=low
* Implemented: SWP#DUI-4131
* Changes: change warning message when library can't be preloaded
-- Nimika Keshri <nimika.1.keshri.nokia.com> Fri, 26 Nov 2010 13:47:26 +0200
applauncherd (0.15.2) stable; urgency=low
* Changes: Fixed crash of booster-m and booster-w / non-quitting booster-m caused

@ -1,8 +1,8 @@
#!/bin/sh
if test -n "$1"
then
git archive --format tar --remote=$1 --output=meegotouch-applauncherd-0.15.2.tar --prefix meegotouch-applauncherd-0.15.2/ released/0.15.2
bzip2 meegotouch-applauncherd-0.15.2.tar
git archive --format tar --remote=$1 --output=meegotouch-applauncherd-0.15.3.tar --prefix meegotouch-applauncherd-0.15.3/ released/0.15.3
bzip2 meegotouch-applauncherd-0.15.3.tar
else
echo "Usage: create-tarball.sh <repo>"
echo " where <repo> is suitable for git archive --remote=<repo>"

@ -1,3 +1,6 @@
* Fri Nov 26 2010 Nimika Keshri <nimika.1.keshri@nokia.com> - 0.15.3
- Updated to version 0.15.3.
* Thu Sep 2 2010 Pertti Kellomäki <pertti.kellomaki@nokia.com> - 0.12.1
- Updated to version 0.12.1.
- Packaged tests and test scripts as subpackages, reorganized testing

@ -7,7 +7,7 @@
Name: meegotouch-applauncherd
Summary: Application launcher for fast startup
Version: 0.15.2
Version: 0.15.3
Release: 1
Group: System/Daemons
License: LGPLv2+

@ -1,6 +1,6 @@
Name: meegotouch-applauncherd
Summary: Application launcher for fast startup
Version: 0.15.2
Version: 0.15.3
Release: 1
Group: System/Daemons
License: LGPLv2+

@ -67,7 +67,7 @@ static void loadLibraries(const char * const libs[], unsigned int numLibs)
dlerror();
if (!dlopen(lib + skipChar, flags))
{
fprintf(stderr, "%s\n", dlerror());
fprintf(stderr, "Warning: can't preload %s\n", lib + skipChar);
}
}
}

@ -176,7 +176,7 @@ class TC_Theming < Test::Unit::TestCase
"/tmp/testshot3.png", "/tmp/testshot4.png")
end
def test_booster_killer
def test_theme_change_booster_restart
m_pid = `pgrep -n booster-m`
w_pid = `pgrep -n booster-w`
print "Current booster-m %s" % m_pid

@ -313,21 +313,6 @@ class launcher_tests (unittest.TestCase):
self.assert_(success, "invoker terminated before delay elapsed")
def test_013_applauncherd_usage(self):
"""
Test applauncherd.bin help
"""
st, op = commands.getstatusoutput("applauncherd.bin --help")
self.assert_(st == 0, "Usage not printed")
str = op.split('\n')
self.assert_(str[0] == 'Usage: applauncherd [options]', "usage not printed properly")
# exec invoker --creds (for coverage)
run_app_as_user("invoker --creds")
# exec invoker --help (for coverage)
run_app_as_user("invoker --help")
def test_014_fd_booster_m(self):
"""

@ -10,20 +10,20 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="zombie-state" type="Functional" description="To test that process exits after the application is killed" timeout="120" level="System">
<case name="zombie-state" type="Functional" description="To test that process exits after the application is killed" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_003_zombie_state</step>
</case>
<case name="launch-multi-app" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="120" level="System">
<case name="launch-multi-app" type="Functional" description="To test that more than one applications are launched by the launcher" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_004_launch_multiple_apps</step>
</case>
<case name="one-instance" type="Functional" description="To test that only one instance of a application exist" timeout="120" level="System">
<case name="one-instance" type="Functional" description="To test that only one instance of a application exist" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_005_one_instance</step>
</case>
<!-- Enable this test for art once the credientials are stable-->
<!--case name="creds-test" type="Functional" description="Test that launched applications get correct credentials when they provide Aegis files" timeout="120" level="System">
<!--case name="creds-test" type="Functional" description="Test that launched applications get correct credentials when they provide Aegis files" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_006_creds</step>
</case-->
@ -40,7 +40,7 @@
<pre_steps>
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Prestart-launched" type="Functional" description="To test that prestarted application is launched" timeout="120" level="System">
<case name="Prestart-launched" type="Functional" description="To test that prestarted application is launched" timeout="360" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/ts_prestartapp.rb name test_launch_prestarted_app</step>
</case>

@ -57,8 +57,8 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_theming.rb --name test_global_theming</step>
</case>
<case name="booster-killer" type="Functional" description="Tests that booster-m and booster-w are restarted after theme change" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_theming.rb --name test_booster_killer</step>
<case name="theme-change-booster-restart" type="Functional" description="Tests that booster-m and booster-w are restarted after theme change" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/tc_theming.rb --name test_theme_change_booster_restart</step>
</case>
<environments>
<scratchbox>true</scratchbox>

@ -39,10 +39,6 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_012</step>
</case>
<case name="applauncherd-usage" type="Functional" description="Test that invokers --delay parameter works" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_013_applauncherd_usage</step>
</case>
<case name="invoker_search_prog" type="Functional" description="Test that invoker finds binaries from PATH" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_invoker_search_prog</step>
</case>

@ -10,7 +10,7 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="launcher1" type="Performance" description="Measure launcher performance" timeout="240" level="System">
<case name="launcher1" type="Performance" description="Measure launcher performance" timeout="840" level="System">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-perf-mbooster.py test_001 &gt; /tmp/launcher_perf.txt</step>
</case>
@ -29,12 +29,12 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Perf-Test-Grid-plain" type="Performance" description="Measure startup time of the application without launcher" timeout="360" level="System" insignificant="true">
<case name="Perf-Test-Grid-plain" type="Performance" description="Measure startup time of the application without launcher" timeout="500" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -a fala_wol -b "fala_wol" &gt; /tmp/perf_grid_without_launcher.txt</step>
</case>
<case name="Perf-Test-Grid-launcher" type="Performance" description="Measure startup time of the application using launcher" timeout="360" level="System" insignificant="true">
<case name="Perf-Test-Grid-launcher" type="Performance" description="Measure startup time of the application using launcher" timeout="500" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -a fala_wl -b "fala_wl" &gt; /tmp/perf_grid_with_launcher.txt</step>
</case>
@ -56,11 +56,12 @@
<step>/usr/bin/waitloadavg.rb -l 1.0 -p 1.0 -t 120</step>
</pre_steps>
<case name="Perf-Test-Command-launcher" type="Performance" description="Measure startup time of the application using launcher" timeout="360" level="System" insignificant="true">
<case name="Perf-Test-Command-launcher" type="Performance" description="Measure startup time of the application using launcher" timeout="500" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -c /usr/bin/fala_wl -b "fala_wl" &gt; /tmp/perf_commandline_with_launcher.txt</step>
</case>
<case name="Perf-Test-Command-plain" type="Performance" description="Measure startup time of the application using launcher" timeout="360" level="System" insignificant="true">
<case name="Perf-Test-Command-plain" type="Performance" description="Measure startup time of the application using launcher" timeout="500" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 /usr/share/applauncherd-testscripts/test-perf.rb name test_performance -- -c /usr/bin/fala_wol -b "fala_wol" &gt; /tmp/perf_commandline_without_launcher.txt</step>
</case>
<environments>
<scratchbox>false</scratchbox>

@ -86,7 +86,7 @@ class TC_Theming < Test::Unit::TestCase
system("pkill #{app_name}")
system("su - user -c #{app_name}&")
system("su - meego -c #{app_name}&")
sleep(5)
#pid = `pgrep -n #{app_name}`
@ -136,7 +136,7 @@ class TC_Theming < Test::Unit::TestCase
# start app and take screenshots of the themed widgets
system("pkill #{app_without_launcher}")
system("pkill #{app_with_launcher}")
system("su - user -c #{app_without_launcher} &")
system("su - meego -c #{app_without_launcher} &")
sleep(5)
app = @sut.application(:name => app_without_launcher)
@ -150,7 +150,7 @@ class TC_Theming < Test::Unit::TestCase
sleep(5)
# once again using the launcher
system("su - user -c #{app_with_launcher} &")
system("su - meego -c #{app_with_launcher} &")
sleep(5)
app = @sut.application(:name => app_with_launcher)
@ -184,7 +184,7 @@ class TC_Theming < Test::Unit::TestCase
app_name = 'fala_ft_hello'
system("pkill #{app_name}")
system("su - user -c #{app_name}&")
system("su - meego -c #{app_name}&")
sleep(2)
original_theme = get_theme()

@ -111,16 +111,18 @@ class launcher_tests (unittest.TestCase):
#self.kill_process(LAUNCHER_BINARY)
process_handle = run_app_as_user(PREFERED_APP)
process_id = wait_for_app(PREFERED_APP, 5)
print process_id
process_id = wait_for_app(PREFERED_APP, 50)
debug("Pid of ",PREFERED_APP," is :",process_id)
time.sleep(2)
kill_process(PREFERED_APP)
time.sleep(4)
time.sleep(2)
process_handle = run_app_as_user(PREFERED_APP)
process_id1 = wait_for_app(PREFERED_APP, 5)
print process_id1
process_id1 = wait_for_app(PREFERED_APP, 50)
debug("Pid of ",PREFERED_APP," is :",process_id1)
time.sleep(2)
kill_process(PREFERED_APP)
time.sleep(4)
time.sleep(2)
process_id1 = get_pid(PREFERED_APP)
print process_id1
@ -141,11 +143,13 @@ class launcher_tests (unittest.TestCase):
for app in LAUNCHABLE_APPS:
p = run_app_as_user(app)
pid = wait_for_app(app, timeout = 10, sleep = 1)
pid = wait_for_app(app, timeout = 100, sleep = 1)
time.sleep(6)
debug("Pid of ",app," is :",pid)
if pid == None:
kill_launched(pidlist)
self.fail("%s was not launched using applauncherd")
self.fail("%s was not launched using applauncherd",app)
pidlist.append(pid)
@ -163,12 +167,13 @@ class launcher_tests (unittest.TestCase):
#y = commands.getstatusoutput(pgrep appname)
#len(y[-1].split(' ')) == 1
process_handle = run_app_as_user(PREFERED_APP)
process_id = wait_for_app(PREFERED_APP)
debug("PID of first %s" % process_id)
time.sleep(2)
process_id = wait_for_app(PREFERED_APP, 100)
debug("PID of 1st %s" % process_id)
process_handle1 = run_app_as_user(PREFERED_APP)
time.sleep(2)
process_id = wait_for_app(PREFERED_APP)
process_id = wait_for_app(PREFERED_APP,100)
debug("PID of 2nd %s" % process_id)
kill_process(PREFERED_APP)
@ -186,7 +191,7 @@ class launcher_tests (unittest.TestCase):
#in a global dictionary, append the pid
process_handle = run_app_as_user(app)
time.sleep(8)
time.sleep(30)
process_id = get_pid('fala_ft_hello')
pid_list = process_id.split()
@ -209,14 +214,16 @@ class launcher_tests (unittest.TestCase):
# Launch the app with invoker using --wait-term
p = run_app_as_user('invoker --type=m --wait-term %s' % app_path)
time.sleep(2)
time.sleep(4)
# Retrieve their pids
invoker_pid = wait_for_app('invoker')
time.sleep(4)
app_pid = wait_for_app('fala_ft_hello')
time.sleep(4)
print "invoker_pid '%s'" % invoker_pid
print "app_pid '%s'" % app_pid
debug("invoker_pid ", invoker_pid)
debug("app_pid " ,app_pid)
# Make sure that both apps started
self.assert_(invoker_pid != None, "invoker not executed?")
@ -225,7 +232,7 @@ class launcher_tests (unittest.TestCase):
# Send SIGTERM to invoker, the launched app should die
kill_process(None, invoker_pid, 15)
time.sleep(2)
time.sleep(8)
# This should be None
app_pid2 = get_pid('fala_ft_hello')
@ -252,7 +259,9 @@ class launcher_tests (unittest.TestCase):
time.sleep(5)
st, op = commands.getstatusoutput('pgrep -lf "applauncherd.bin --daemon"')
print op
time.sleep(5)
debug("The pid of applauncherd in daemon mode is :", op)
# filter some cruft out from the output and see how many
# instances are running
@ -265,9 +274,10 @@ class launcher_tests (unittest.TestCase):
# try to launch an app
run_app_as_user('/usr/bin/fala_ft_hello')
time.sleep(2)
time.sleep(6)
pid = wait_for_app('fala_ft_hello')
time.sleep(6)
if pid != None:
kill_process(apppid = pid)
@ -313,21 +323,6 @@ class launcher_tests (unittest.TestCase):
self.assert_(success, "invoker terminated before delay elapsed")
def test_013_applauncherd_usage(self):
"""
Test applauncherd.bin help
"""
st, op = commands.getstatusoutput("applauncherd.bin --help")
self.assert_(st == 0, "Usage not printed")
str = op.split('\n')
self.assert_(str[0] == 'Usage: applauncherd [options]', "usage not printed properly")
# exec invoker --creds (for coverage)
run_app_as_user("invoker --creds")
# exec invoker --help (for coverage)
run_app_as_user("invoker --help")
def test_014_fd_booster_m(self):
"""

@ -46,7 +46,7 @@ def start_applauncherd():
return handle.wait() == 0
def stop_applauncherd():
def kill_applauncherd():
handle = Popen(['initctl', 'stop', 'xsession/applauncherd'],
stdout = DEV_NULL, stderr = DEV_NULL,
shell = False)
@ -87,16 +87,14 @@ def get_pid(appname):
else:
return None
def get_newest_pid(app):
p = subprocess.Popen(['pgrep', '-n', app], shell = False,
stdout = subprocess.PIPE, stderr = DEV_NULL)
op = p.communicate()[0]
if p.wait() == 0:
return op.strip()
return None
def get_newest_pid(appname):
temp = basename(appname)[:14]
st, op = commands.getstatusoutput("pgrep -n %s" % temp)
time.sleep(5)
if st == 0:
return op
else:
return None
def wait_for_app(app = None, timeout = 5, sleep = 0.5):
"""

@ -39,10 +39,6 @@
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 python2.6 /usr/share/applauncherd-M-testscripts/test-func-launcher.py test_012</step>
</case>
<case name="applauncherd-usage" type="Functional" description="Test that invokers --delay parameter works" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 python2.6 /usr/share/applauncherd-M-testscripts/test-func-launcher.py test_013_applauncherd_usage</step>
</case>
<case name="invoker_search_prog" type="Functional" description="Test that invoker finds binaries from PATH" timeout="360" level="System" insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 python2.6 /usr/share/applauncherd-M-testscripts/test-func-launcher.py test_invoker_search_prog</step>
</case>

Loading…
Cancel
Save