diff --git a/python-api/tests/integrationtests/test_controller.py b/python-api/tests/integrationtests/test_controller.py index e3d4342..523c91a 100644 --- a/python-api/tests/integrationtests/test_controller.py +++ b/python-api/tests/integrationtests/test_controller.py @@ -34,6 +34,11 @@ def test_establish(self): s.terminate() finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -70,6 +75,11 @@ def test_compose_ports(self): s.terminate() finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -109,6 +119,11 @@ def test_encode_ports(self): s.terminate() finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -151,6 +166,11 @@ def test_audio_ports(self): s.terminate() finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -195,6 +215,11 @@ def test_audio_ports(self): s.terminate() finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -237,6 +262,11 @@ def test_get_preview_ports(self): s.terminate() finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -304,6 +334,11 @@ def set_composite_mode(self, mode, generate_frames=False): finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -361,6 +396,11 @@ def test_new_record(self): assert ((os.path.exists(test_filename)) or (os.path.exists(alt_test_filename))) == True finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -399,6 +439,11 @@ def adjust_pip(self, dx, dy, dw, dh, index, generate_frames=False): finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -449,6 +494,11 @@ def switch(self, channel, port, index, generate_frames=False): s.terminate() finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -496,6 +546,11 @@ def click_video(self, dx, dy, dw, dh, index, generate_frames=False): finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() @@ -552,6 +607,11 @@ def mark_face(self, faces, index, generate_frames=False): finally: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.terminate() f = open('server.log') print f.read() diff --git a/python-api/tests/integrationtests/test_server.py b/python-api/tests/integrationtests/test_server.py index b531a3c..40ebf73 100644 --- a/python-api/tests/integrationtests/test_server.py +++ b/python-api/tests/integrationtests/test_server.py @@ -25,6 +25,11 @@ def startstop(self): assert s.proc is None except OSError: if s.proc: + poll = s.poll() + if poll == -11: + print "SEGMENTATION FAULT OCCURRED" + else: + print "ERROR CODE - {0}".format(poll) s.kill() f = open('server.log') print f.read()