forked from mirrors/gecko-dev
Bug 921632 - Re-enable delayed kill broad mozprocess unit test. r=ahal
MozReview-Commit-ID: 93KwNlw84ld --HG-- extra : rebase_source : fd96ee848ea3b4211db338f6f337372901fff210
This commit is contained in:
parent
143a5b13fa
commit
96ed8b8cf5
3 changed files with 14 additions and 40 deletions
|
|
@ -9,8 +9,6 @@ subsuite = mozbase, os == "linux"
|
||||||
[test_mozprocess.py]
|
[test_mozprocess.py]
|
||||||
disabled = bug 877864
|
disabled = bug 877864
|
||||||
[test_mozprocess_kill.py]
|
[test_mozprocess_kill.py]
|
||||||
[test_mozprocess_kill_broad_wait.py]
|
|
||||||
disabled = bug 921632
|
|
||||||
[test_mozprocess_misc.py]
|
[test_mozprocess_misc.py]
|
||||||
[test_mozprocess_poll.py]
|
[test_mozprocess_poll.py]
|
||||||
[test_mozprocess_wait.py]
|
[test_mozprocess_wait.py]
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,20 @@ class ProcTestKill(proctest.ProcTest):
|
||||||
|
|
||||||
self.determine_status(p, expectedfail=('returncode',))
|
self.determine_status(p, expectedfail=('returncode',))
|
||||||
|
|
||||||
|
def test_process_kill_broad_delayed(self):
|
||||||
|
"""Process is started, we use a broad process tree, we let it spawn
|
||||||
|
for a bit, we kill it"""
|
||||||
|
|
||||||
|
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||||
|
"process_normal_broad_python.ini"],
|
||||||
|
cwd=here)
|
||||||
|
p.run()
|
||||||
|
# Let the tree spawn a bit, before attempting to kill
|
||||||
|
time.sleep(3)
|
||||||
|
p.kill()
|
||||||
|
|
||||||
|
self.determine_status(p, expectedfail=('returncode',))
|
||||||
|
|
||||||
@unittest.skipUnless(processhandler.isPosix, "posix only")
|
@unittest.skipUnless(processhandler.isPosix, "posix only")
|
||||||
def test_process_kill_with_sigterm(self):
|
def test_process_kill_with_sigterm(self):
|
||||||
script = os.path.join(here, 'infinite_loop.py')
|
script = os.path.join(here, 'infinite_loop.py')
|
||||||
|
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
from __future__ import absolute_import
|
|
||||||
|
|
||||||
import os
|
|
||||||
import time
|
|
||||||
import proctest
|
|
||||||
|
|
||||||
import mozunit
|
|
||||||
|
|
||||||
from mozprocess import processhandler
|
|
||||||
|
|
||||||
here = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
|
|
||||||
|
|
||||||
class ProcTestKill(proctest.ProcTest):
|
|
||||||
""" Class to test various process tree killing scenatios """
|
|
||||||
|
|
||||||
# This test should ideally be a part of test_mozprocess_kill.py
|
|
||||||
# It has been separated for the purpose of tempporarily disabling it.
|
|
||||||
# See https://bugzilla.mozilla.org/show_bug.cgi?id=921632
|
|
||||||
def test_process_kill_broad_wait(self):
|
|
||||||
"""Process is started, we use a broad process tree, we let it spawn
|
|
||||||
for a bit, we kill it"""
|
|
||||||
|
|
||||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
|
||||||
"process_normal_broad_python.ini"],
|
|
||||||
cwd=here)
|
|
||||||
p.run()
|
|
||||||
# Let the tree spawn a bit, before attempting to kill
|
|
||||||
time.sleep(3)
|
|
||||||
p.kill()
|
|
||||||
|
|
||||||
self.determine_status(p, expectedfail=('returncode',))
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
mozunit.main()
|
|
||||||
Loading…
Reference in a new issue