Skip to content

Commit

Permalink
switch integration tests - initial switching done
Browse files Browse the repository at this point in the history
  • Loading branch information
hyades committed Aug 22, 2013
1 parent 2a32fce commit d74577d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python-api/tests/integrationtests/__helper__.py
@@ -0,0 +1,5 @@
l = open("logs").readlines()
for i in l:
if i.find('gst-switch') < 0:
if len(i) >2:
print i
35 changes: 35 additions & 0 deletions python-api/tests/integrationtests/test_controller.py
Expand Up @@ -402,3 +402,38 @@ def test_adjust_pip(self):
for i in range(4,5):
self.adjust_pip(d[i-4][0], d[i-4][1], d[i-4][2], d[i-4][3], i)


class TestSwitch(object):

NUM = 1

def switch(self, channel, port, index, generate_frames=False):
for i in range(self.NUM):
s = Server(path=PATH)
try:
s.run()

sources = TestSources(3000)
sources.new_test_video(pattern=4)
sources.new_test_video(pattern=5)
preview = PreviewSinks(3001)
preview.run()
time.sleep(3)
controller = Controller()
res = controller.switch(channel, port)
print res
time.sleep(3)
sources.terminate_video()
preview.terminate()
s.terminate()
finally:
if s.proc:
s.terminate()

def test_switch(self):
d = [
[65, 3004]
]
start = 5
for i in range(start, 6):
self.switch(d[i-start][0], d[i-start][1], i)

0 comments on commit d74577d

Please sign in to comment.