Changes: add a test for invokers -o param

RevBy: TrustMe
pull/1/head
Oskari Timperi 15 years ago
parent e4a907e83d
commit 497ea63dcb

@ -878,7 +878,7 @@ class launcher_tests (unittest.TestCase):
self.assert_(op1.split(",")[0] == '"fala_wl"','Application name is incorrect')
kill_process('fala_wl')
def test_oom_adj(self):
def test_oom_adj_zero(self):
"""
Test that oom.adj is 0 for launched application process
"""
@ -889,6 +889,24 @@ class launcher_tests (unittest.TestCase):
self.assert_(op == '0',"oom.adj of the launched process is not 0")
kill_process(PREFERED_APP)
def test_oom_adj_minus_one(self):
"""
Test that oom.adj is -1 for launched application process when using
invokers -o param
"""
p = run_app_as_user_with_invoker(PREFERED_APP, booster = 'm',
arg = '-o')
time.sleep(2)
pid = get_pid(PREFERED_APP)
st, op = commands.getstatusoutput('cat /proc/%s/oom_adj' % pid)
self.assert_(op == '-1', "oom.adj of the launched process is not -1")
kill_process(PREFERED_APP)
# main
if __name__ == '__main__':
# When run with testrunner, for some reason the PATH doesn't include

@ -22,8 +22,12 @@
<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="applauncherd__test_oom_adj" type="Functional" description="Test that oom.adj is 0 for launched application process" 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_oom_adj</step>
<case name="applauncherd__test_oom_adj_zero" type="Functional" description="Test that oom.adj is 0 for launched application process" 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_oom_adj_zero</step>
</case>
<case name="applauncherd__test_oom_adj_minus_one" type="Functional" description="Test that oom.adj is -1 for launched application process when using invokers -o parameter" 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_oom_adj_minus_one</step>
</case>
<case name="applauncherd__test_launched_app_name" type="Functional" description="Test that launched application name have .launch at the end" timeout="460" level="System" insignificant="true">

Loading…
Cancel
Save