зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1435820 - Rename mozprocess unit tests and support files. r=ahal
MozReview-Commit-ID: 2LhfafKi8ym --HG-- rename : testing/mozbase/mozprocess/tests/process_normal_broad_python.ini => testing/mozbase/mozprocess/tests/process_normal_broad.ini rename : testing/mozbase/mozprocess/tests/process_normal_deep_python.ini => testing/mozbase/mozprocess/tests/process_normal_deep.ini rename : testing/mozbase/mozprocess/tests/process_normal_finish_python.ini => testing/mozbase/mozprocess/tests/process_normal_finish.ini rename : testing/mozbase/mozprocess/tests/process_waittimeout_python.ini => testing/mozbase/mozprocess/tests/process_waittimeout.ini rename : testing/mozbase/mozprocess/tests/process_waittimeout_10s_python.ini => testing/mozbase/mozprocess/tests/process_waittimeout_10s.ini rename : testing/mozbase/mozprocess/tests/infinite_loop.py => testing/mozbase/mozprocess/tests/scripts/infinite_loop.py rename : testing/mozbase/mozprocess/tests/proccountfive.py => testing/mozbase/mozprocess/tests/scripts/proccountfive.py rename : testing/mozbase/mozprocess/tests/procnonewline.py => testing/mozbase/mozprocess/tests/scripts/procnonewline.py rename : testing/mozbase/mozprocess/tests/test_mozprocess_kill.py => testing/mozbase/mozprocess/tests/test_kill.py rename : testing/mozbase/mozprocess/tests/test_mozprocess_misc.py => testing/mozbase/mozprocess/tests/test_misc.py rename : testing/mozbase/mozprocess/tests/test_mozprocess_output.py => testing/mozbase/mozprocess/tests/test_output.py rename : testing/mozbase/mozprocess/tests/test_mozprocess_params.py => testing/mozbase/mozprocess/tests/test_params.py rename : testing/mozbase/mozprocess/tests/test_mozprocess_poll.py => testing/mozbase/mozprocess/tests/test_poll.py rename : testing/mozbase/mozprocess/tests/test_mozprocess_wait.py => testing/mozbase/mozprocess/tests/test_wait.py extra : rebase_source : e026178ca6fe2a34d5621e50f7f28812e3ad4ac8
This commit is contained in:
Родитель
4bc4175eb0
Коммит
581602594e
|
@ -6,10 +6,10 @@
|
|||
skip-if = (os == "win")
|
||||
subsuite = mozbase, os == "linux"
|
||||
|
||||
[test_mozprocess_kill.py]
|
||||
[test_mozprocess_misc.py]
|
||||
[test_mozprocess_poll.py]
|
||||
[test_mozprocess_wait.py]
|
||||
[test_mozprocess_output.py]
|
||||
[test_mozprocess_params.py]
|
||||
[test_kill.py]
|
||||
[test_misc.py]
|
||||
[test_poll.py]
|
||||
[test_wait.py]
|
||||
[test_output.py]
|
||||
[test_params.py]
|
||||
[test_process_reader.py]
|
||||
|
|
|
@ -28,7 +28,7 @@ class ProcTestKill(proctest.ProcTest):
|
|||
"""Process is started, we kill it"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_finish_python.ini"],
|
||||
"process_normal_finish.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
p.kill()
|
||||
|
@ -39,7 +39,7 @@ class ProcTestKill(proctest.ProcTest):
|
|||
"""Process is started, we kill it, we use a deep process tree"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_deep_python.ini"],
|
||||
"process_normal_deep.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
p.kill()
|
||||
|
@ -51,7 +51,7 @@ class ProcTestKill(proctest.ProcTest):
|
|||
for a bit, we kill it"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_deep_python.ini"],
|
||||
"process_normal_deep.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
# Let the tree spawn a bit, before attempting to kill
|
||||
|
@ -64,7 +64,7 @@ class ProcTestKill(proctest.ProcTest):
|
|||
"""Process is started, we kill it, we use a broad process tree"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_broad_python.ini"],
|
||||
"process_normal_broad.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
p.kill()
|
||||
|
@ -76,7 +76,7 @@ class ProcTestKill(proctest.ProcTest):
|
|||
for a bit, we kill it"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_broad_python.ini"],
|
||||
"process_normal_broad.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
# Let the tree spawn a bit, before attempting to kill
|
||||
|
@ -87,7 +87,7 @@ class ProcTestKill(proctest.ProcTest):
|
|||
|
||||
@unittest.skipUnless(processhandler.isPosix, "posix only")
|
||||
def test_process_kill_with_sigterm(self):
|
||||
script = os.path.join(here, 'infinite_loop.py')
|
||||
script = os.path.join(here, 'scripts', 'infinite_loop.py')
|
||||
p = processhandler.ProcessHandler([self.python, script])
|
||||
|
||||
p.run()
|
||||
|
@ -97,7 +97,7 @@ class ProcTestKill(proctest.ProcTest):
|
|||
|
||||
@unittest.skipUnless(processhandler.isPosix, "posix only")
|
||||
def test_process_kill_with_sigint_if_needed(self):
|
||||
script = os.path.join(here, 'infinite_loop.py')
|
||||
script = os.path.join(here, 'scripts', 'infinite_loop.py')
|
||||
p = processhandler.ProcessHandler([self.python, script, 'deadlock'])
|
||||
|
||||
p.run()
|
|
@ -26,7 +26,7 @@ class ProcTestMisc(proctest.ProcTest):
|
|||
self.assertEqual(p.proc.poll(), None)
|
||||
p.kill()
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_waittimeout_python.ini"],
|
||||
"process_waittimeout.ini"],
|
||||
cwd=here,
|
||||
onTimeout=(timeout_handler,),
|
||||
kill_on_timeout=False)
|
||||
|
@ -41,7 +41,7 @@ class ProcTestMisc(proctest.ProcTest):
|
|||
'FOOBAR': 'ʘ',
|
||||
}
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_finish_python.ini"],
|
||||
"process_normal_finish.ini"],
|
||||
cwd=here, env=env)
|
||||
# passes if no exceptions are raised
|
||||
p.run()
|
|
@ -21,7 +21,7 @@ class ProcTestOutput(proctest.ProcTest):
|
|||
Process is started, then processOutput is called a second time explicitly
|
||||
"""
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_waittimeout_10s_python.ini"],
|
||||
"process_waittimeout_10s.ini"],
|
||||
cwd=here)
|
||||
|
||||
p.run()
|
||||
|
@ -34,7 +34,7 @@ class ProcTestOutput(proctest.ProcTest):
|
|||
"""
|
||||
Process is started, outputs data with no newline
|
||||
"""
|
||||
p = processhandler.ProcessHandler([self.python, "procnonewline.py"],
|
||||
p = processhandler.ProcessHandler([self.python, "scripts", "procnonewline.py"],
|
||||
cwd=here)
|
||||
|
||||
p.run()
|
||||
|
@ -52,7 +52,8 @@ class ProcTestOutput(proctest.ProcTest):
|
|||
stream = io.BytesIO()
|
||||
buf = io.BufferedRandom(stream)
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, "proccountfive.py"],
|
||||
p = processhandler.ProcessHandler([self.python,
|
||||
os.path.join("scripts", "proccountfive.py")],
|
||||
cwd=here,
|
||||
stream=buf)
|
||||
|
|
@ -22,7 +22,7 @@ class ProcTestPoll(proctest.ProcTest):
|
|||
"""Process is not started, and poll() is called"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_finish_python.ini"],
|
||||
"process_normal_finish.ini"],
|
||||
cwd=here)
|
||||
self.assertRaises(RuntimeError, p.poll)
|
||||
|
||||
|
@ -30,7 +30,7 @@ class ProcTestPoll(proctest.ProcTest):
|
|||
"""Process is started, and poll() is called"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_finish_python.ini"],
|
||||
"process_normal_finish.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
returncode = p.poll()
|
||||
|
@ -44,7 +44,7 @@ class ProcTestPoll(proctest.ProcTest):
|
|||
"""Process is killed, and poll() is called"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_finish_python.ini"],
|
||||
"process_normal_finish.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
returncode = p.kill()
|
||||
|
@ -76,7 +76,7 @@ class ProcTestPoll(proctest.ProcTest):
|
|||
"""Process is killed twice, and poll() is called"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_finish_python.ini"],
|
||||
"process_normal_finish.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
p.kill()
|
||||
|
@ -92,7 +92,7 @@ class ProcTestPoll(proctest.ProcTest):
|
|||
"""Process is killed externally, and poll() is called"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_finish_python.ini"],
|
||||
"process_normal_finish.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
os.kill(p.pid, signal.SIGTERM)
|
|
@ -20,7 +20,7 @@ class ProcTestWait(proctest.ProcTest):
|
|||
"""Process is started, runs to completion while we wait for it"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_normal_finish_python.ini"],
|
||||
"process_normal_finish.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
p.wait()
|
||||
|
@ -31,7 +31,7 @@ class ProcTestWait(proctest.ProcTest):
|
|||
"""Process is started runs to completion while we wait indefinitely"""
|
||||
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_waittimeout_10s_python.ini"],
|
||||
"process_waittimeout_10s.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
p.wait()
|
||||
|
@ -43,7 +43,7 @@ class ProcTestWait(proctest.ProcTest):
|
|||
to complete
|
||||
"""
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_waittimeout_python.ini"],
|
||||
"process_waittimeout.ini"],
|
||||
cwd=here)
|
||||
p.run(timeout=10)
|
||||
p.wait()
|
||||
|
@ -60,7 +60,7 @@ class ProcTestWait(proctest.ProcTest):
|
|||
Process is still running and didn't timeout
|
||||
"""
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_waittimeout_10s_python.ini"],
|
||||
"process_waittimeout_10s.ini"],
|
||||
cwd=here)
|
||||
|
||||
p.run()
|
||||
|
@ -72,7 +72,7 @@ class ProcTestWait(proctest.ProcTest):
|
|||
""" Process is started, runs to completion before our wait times out
|
||||
"""
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_waittimeout_10s_python.ini"],
|
||||
"process_waittimeout_10s.ini"],
|
||||
cwd=here)
|
||||
p.run(timeout=30)
|
||||
p.wait()
|
||||
|
@ -82,7 +82,7 @@ class ProcTestWait(proctest.ProcTest):
|
|||
def test_wait_twice_after_kill(self):
|
||||
"""Bug 968718: Process is started and stopped. wait() twice afterward."""
|
||||
p = processhandler.ProcessHandler([self.python, self.proclaunch,
|
||||
"process_waittimeout_python.ini"],
|
||||
"process_waittimeout.ini"],
|
||||
cwd=here)
|
||||
p.run()
|
||||
p.kill()
|
Загрузка…
Ссылка в новой задаче