From a2c5603d0def0387aaad53ecf5d0beb22c7b535f Mon Sep 17 00:00:00 2001 From: hyades Date: Sat, 24 Aug 2013 00:04:05 +0530 Subject: [PATCH] Modified Makefile and improved paths --- docs/index.rst | 2 +- python-api/Makefile | 16 +++++++++++----- python-api/gstswitch/helpers.py | 2 +- python-api/tests/integrationtests/compare.py | 2 +- python-api/tests/integrationtests/test.py | 2 +- .../tests/integrationtests/test_controller.py | 2 +- .../tests/integrationtests/test_helpers.py | 2 +- python-api/tests/integrationtests/test_server.py | 2 +- 8 files changed, 18 insertions(+), 12 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 82c18cc..e5a3819 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,7 +3,7 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to gstswitch's documentation! +Welcome to Gst-Switch's Documentation! ===================================== Contents: diff --git a/python-api/Makefile b/python-api/Makefile index 9de44d9..14722fb 100644 --- a/python-api/Makefile +++ b/python-api/Makefile @@ -6,17 +6,23 @@ lint: @echo "Lint report generated in reports/pylint" # runs py.test also -coverage: +unittests: mkdir -p reports - mkdir -p reports/coverage + mkdir -p reports/coverage/unittests -py.test --cov-report html --cov gstswitch tests/unittests/ -v -s - mv htmlcov/*.* reports/coverage + mv htmlcov/*.* reports/coverage/unittests rmdir htmlcov pytest: -py.test tests/unittests -v integration: - -py.test tests/integrationtests/ -s -v 2>/dev/null - rm *.data + mkdir -p reports + mkdir -p reports/coverage/integration + -py.test --cov-report html --cov gstswitch tests/integrationtests/ -s -v 2>/dev/null + mv htmlcov/*.* reports/coverage/integration + rm -f *.data + rm -f tests/integrationtests/*.data + +test: unittests integration diff --git a/python-api/gstswitch/helpers.py b/python-api/gstswitch/helpers.py index 28249bc..22d291e 100644 --- a/python-api/gstswitch/helpers.py +++ b/python-api/gstswitch/helpers.py @@ -185,7 +185,7 @@ def terminate_index_audio(self, index): except TypeError: raise InvalidIndexError("Index should be a valid integer") - print 'End source with pattern %s' % (str(testsrc.wave)) + print 'End source with wave %s' % (str(testsrc.wave)) testsrc.end() self._running_tests_audio.remove(self._running_tests_audio[index]) diff --git a/python-api/tests/integrationtests/compare.py b/python-api/tests/integrationtests/compare.py index 298ef40..29ac0b1 100644 --- a/python-api/tests/integrationtests/compare.py +++ b/python-api/tests/integrationtests/compare.py @@ -23,7 +23,7 @@ class BaseCompareVideo(object): 'composite_mode_3': 3, 'adjust_pip_4': 4 } - REF_FRAME_DIR = 'reference_frames' + REF_FRAME_DIR = os.getenv("HOME") + '/gst/gst-switch/python-api/tests/integrationtests/reference_frames' def __init__(self): pass diff --git a/python-api/tests/integrationtests/test.py b/python-api/tests/integrationtests/test.py index 6d1c66e..a02c365 100755 --- a/python-api/tests/integrationtests/test.py +++ b/python-api/tests/integrationtests/test.py @@ -22,7 +22,7 @@ gi.require_version('Gst', '1.0') # all executables (gst-launch-1.0, gst-switch-srv, gst-switch-ui, gst-switch-cap) at this path -path = '/home/hyades/gst/stage/bin/' +path = os.getenv("HOME") + '/gst/stage/bin/' # path = '/usr/local/bin/' s = Server(path) try: diff --git a/python-api/tests/integrationtests/test_controller.py b/python-api/tests/integrationtests/test_controller.py index 482d601..fa8ca1c 100644 --- a/python-api/tests/integrationtests/test_controller.py +++ b/python-api/tests/integrationtests/test_controller.py @@ -12,7 +12,7 @@ import subprocess -PATH = '/home/hyades/gst/stage/bin/' +PATH = os.getenv("HOME") + '/gst/stage/bin/' class TestEstablishConnection(object): diff --git a/python-api/tests/integrationtests/test_helpers.py b/python-api/tests/integrationtests/test_helpers.py index 76c1a57..e534c6d 100644 --- a/python-api/tests/integrationtests/test_helpers.py +++ b/python-api/tests/integrationtests/test_helpers.py @@ -7,7 +7,7 @@ import time -PATH = '/home/hyades/gst/stage/bin/' +PATH = os.getenv("HOME") + '/gst/stage/bin/' class TestTestSourcesPreviews(object): diff --git a/python-api/tests/integrationtests/test_server.py b/python-api/tests/integrationtests/test_server.py index dc46f46..3623805 100644 --- a/python-api/tests/integrationtests/test_server.py +++ b/python-api/tests/integrationtests/test_server.py @@ -8,7 +8,7 @@ import glob -PATH = '/home/hyades/gst/stage/bin/' +PATH = os.getenv("HOME") + '/gst/stage/bin/' class TestServerStartStop(object):