Skip to content

Commit

Permalink
Stop signal has been unified over all platforms to SIGTERM, since SIG…
Browse files Browse the repository at this point in the history
…INT started causing messages to stderr.
  • Loading branch information
olivopaolo committed Nov 22, 2012
1 parent fc1cb17 commit 1b1971c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions boing/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
configtestfile = os.path.abspath(os.path.join(os.path.dirname(__file__),
"data", "config-filters.txt"))
sysprefix = "/" if sys.platform=="win32" else ""
timeoutsignal = signal.SIGINT if sys.platform=="linux2" else signal.SIGTERM

cmds = (
# Command line arguments
Expand Down Expand Up @@ -72,7 +71,7 @@ def test_no_exceptions(self):
else:
# Timeout: stop and wait
while returncode is None:
self.proc.send_signal(timeoutsignal)
self.proc.send_signal(signal.SIGTERM)
returncode = self.proc.poll()
if returncode is None : time.sleep(0.1)
# Check stderr is empty
Expand Down Expand Up @@ -104,7 +103,7 @@ def test_in_std_out_std(self):
time.sleep(0.1)
else:
# Timeout: stop and wait
self.proc.send_signal(timeoutsignal)
self.proc.send_signal(signal.SIGTERM)
returncode = self.proc.wait()
# Compare output
self.out.seek(0)
Expand All @@ -128,7 +127,7 @@ def test_in_file_out_std(self):
time.sleep(0.1)
else:
# Timeout: stop and wait
self.proc.send_signal(timeoutsignal)
self.proc.send_signal(signal.SIGTERM)
returncode = self.proc.wait()
# Compare output
self.out.seek(0)
Expand All @@ -155,7 +154,7 @@ def test_in_std_out_file(self):
time.sleep(0.1)
else:
# Timeout: stop and wait
self.proc.send_signal(timeoutsignal)
self.proc.send_signal(signal.SIGTERM)
returncode = self.proc.wait()
# Compare output
tempout.seek(0)
Expand Down

0 comments on commit 1b1971c

Please sign in to comment.