Skip to content

Commit

Permalink
Merge pull request #60 from hyades/master
Browse files Browse the repository at this point in the history
Fixes travis build. Corrections in integration and performance tests run by the API.
  • Loading branch information
mithro committed Dec 7, 2014
2 parents 6b77456 + fc0c3d3 commit ede2223
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ imgurbash.sh.*
*.data
*.log
/tools/gst-switch-ptz
test-driver
2 changes: 1 addition & 1 deletion .travis-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ case $TEST in
printf "Tests failed!\n"
exit -1
}
coveralls -n -r $HOME/gst-switch-coverage
coveralls -n -r ../tools
esac
esac || {
printf "Failed!\n!\n"
Expand Down
9 changes: 5 additions & 4 deletions .travis-setup.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#! /bin/bash -ex

sudo apt-get update
sudo pip install mock
sudo pip install pytest-cov
sudo pip install pytest-pep8
sudo pip install pylint
sudo pip install mock --upgrade
sudo pip install pytest-cov --upgrade
sudo pip install pytest-pep8 --upgrade
sudo pip install pylint --upgrade
sudo apt-get -y install libglib2.0-dev gir1.2-glib-2.0 libgirepository1.0-dev libglib2.0-0 python-gi
sudo apt-get -y install gstreamer0.10-plugins-good
sudo apt-get -y install python-scipy
sudo apt-get -y install ffmpeg || sudo apt-get -y install libav-tools
sudo apt-get -y install libvo-aacenc-dev
sudo apt-get -y install autoconf automake autopoint libbz2-dev libdv4-dev libfaac-dev libfaad-dev libgtk-3-dev libmjpegtools-dev libtag1-dev libasound2-dev libtool libvpx-dev libxv-dev libx11-dev libogg-dev libvorbis-dev libopencv-dev libcv-dev libhighgui-dev libv4l-dev pkg-config zlib1g-dev gtk-doc-tools yasm bison flex
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
export LD_LIBRARY_PATH=/usr/lib/
Expand Down
20 changes: 10 additions & 10 deletions python-api/tests/integrationtests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import subprocess

# PATH = os.getenv("HOME") + '/gst/stage/bin/'
PATH = '/usr/bin/'
PATH = '../tools/'


class TestEstablishConnection(object):
Expand Down Expand Up @@ -254,9 +254,9 @@ class VideoFileSink(object):
"""Sink the video to a file
"""

def __init__(self, path, port, filename):
cmd = "{0}/gst-launch-1.0 tcpclientsrc port={1} ! gdpdepay ! jpegenc \
! avimux ! filesink location={2}".format(path, port, filename)
def __init__(self, port, filename):
cmd = "gst-launch-1.0 tcpclientsrc port={0} ! gdpdepay ! jpegenc \
! avimux ! filesink location={1}".format(port, filename)
with open(os.devnull, 'w') as tempf:
self.proc = subprocess.Popen(
cmd.split(),
Expand Down Expand Up @@ -288,7 +288,7 @@ def set_composite_mode(self, mode, generate_frames=False):
preview.run()

out_file = 'output-{0}.data'.format(mode)
video_sink = VideoFileSink(PATH, serv.video_port + 1, out_file)
video_sink = VideoFileSink(serv.video_port + 1, out_file)

sources = TestSources(video_port=3000)
sources.new_test_video(pattern=4)
Expand Down Expand Up @@ -421,7 +421,7 @@ def adjust_pip(self,
preview = PreviewSinks()
preview.run()
out_file = "output-{0}.data".format(index)
video_sink = VideoFileSink(PATH, 3001, out_file)
video_sink = VideoFileSink(3001, out_file)
sources.new_test_video(pattern=4)
sources.new_test_video(pattern=5)
controller = Controller()
Expand Down Expand Up @@ -492,7 +492,7 @@ def switch(self, channel, port, index):
preview = PreviewSinks(3001)
preview.run()
out_file = "output-{0}.data".format(index)
video_sink = VideoFileSink(PATH, 3001, out_file)
video_sink = VideoFileSink(3001, out_file)
time.sleep(3)
controller = Controller()
res = controller.switch(channel, port)
Expand Down Expand Up @@ -546,7 +546,7 @@ def click_video(self,
preview = PreviewSinks()
preview.run()
out_file = "output-{0}.data".format(index)
video_sink = VideoFileSink(PATH, 3001, out_file)
video_sink = VideoFileSink(3001, out_file)
sources.new_test_video(pattern=4)
sources.new_test_video(pattern=5)
controller = Controller()
Expand Down Expand Up @@ -615,7 +615,7 @@ def mark_face(self, faces, index, generate_frames=False):
preview = PreviewSinks()
preview.run()
out_file = "output-{0}.data".format(index)
video_sink = VideoFileSink(PATH, 3001, out_file)
video_sink = VideoFileSink(3001, out_file)
sources.new_test_video(pattern=4)
sources.new_test_video(pattern=5)
controller = Controller()
Expand Down Expand Up @@ -678,7 +678,7 @@ def mark_tracking(self, faces, index, generate_frames=False):
preview = PreviewSinks()
preview.run()
out_file = "output-{0}.data".format(index)
video_sink = VideoFileSink(PATH, 3001, out_file)
video_sink = VideoFileSink(3001, out_file)
sources.new_test_video(pattern=4)
sources.new_test_video(pattern=5)
controller = Controller()
Expand Down
2 changes: 1 addition & 1 deletion python-api/tests/integrationtests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


# PATH = os.getenv("HOME") + '/gst/stage/bin/'
PATH = '/usr/bin/'
PATH = '../tools/'


class TestTestSourcesPreviews(object):
Expand Down
2 changes: 1 addition & 1 deletion python-api/tests/integrationtests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from gstswitch.server import Server

# PATH = os.getenv("HOME") + '/gst/stage/bin/'
PATH = '/usr/bin/'
PATH = '../tools/'


class TestServerStartStop(object):
Expand Down
2 changes: 1 addition & 1 deletion python-api/tests/performancetests/performance_dbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from gstswitch.controller import Controller
import time

PATH = '/usr/bin/'
PATH = '../tools/'



Expand Down

0 comments on commit ede2223

Please sign in to comment.