Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: timvideos/gst-switch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 67317e77206a
Choose a base ref
...
head repository: timvideos/gst-switch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a4a73d8b0fd5
Choose a head ref
  • 11 commits
  • 8 files changed
  • 1 contributor

Commits on Jan 30, 2015

  1. Copy the full SHA
    1824311 View commit details
  2. Fixing the Makefile.

    mithro committed Jan 30, 2015
    Copy the full SHA
    cb091e9 View commit details
  3. Copy the full SHA
    4b20d6c View commit details
  4. Copy the full SHA
    ba5316f View commit details
  5. Adding libyaml-dev needed by PyYAML needed by coveralls.

    Fixes;
    ```
    Running setup.py install for PyYAML
      checking if libyaml is compilable
      x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o
      build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
       #include <yaml.h>
                        ^
      compilation terminated.
    
      libyaml is not found or a compiler error: forcing --without-libyaml
      (if libyaml is installed correctly, you may need to
       specify the option --include-dirs or uncomment and
       modify the parameter include_dirs in setup.cfg)
    ```
    mithro committed Jan 30, 2015
    Copy the full SHA
    fbe256e View commit details
  6. Integration test not unit.

    mithro committed Jan 30, 2015
    Copy the full SHA
    ffe029c View commit details

Commits on Jan 31, 2015

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    11bc3b5 View commit details
  2. Make .travis-setup executable.

    mithro committed Jan 31, 2015
    Copy the full SHA
    2cd239e View commit details
  3. Copy the full SHA
    72b8fd3 View commit details
  4. Need to install indent.

    mithro committed Jan 31, 2015
    Copy the full SHA
    9784299 View commit details
  5. Merge pull request #185 from mithro/travisfix

    Rework how the travis build works.
    mithro committed Jan 31, 2015
    Copy the full SHA
    a4a73d8 View commit details
Showing with 103 additions and 66 deletions.
  1. +26 −0 .travis-after.sh
  2. +12 −49 .travis-run.sh
  3. +7 −3 .travis-setup.sh
  4. +10 −3 .travis.yml
  5. +17 −0 Makefile.am
  6. +13 −9 python-api/Makefile
  7. +1 −0 scripts/apps/app_indent.sh
  8. +17 −2 tests/unit/Makefile.am
26 changes: 26 additions & 0 deletions .travis-after.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! /bin/bash -ex
#
# This script runs after everything has finished. It should be used to upload
# any build assets, logs and coverage information.


if [[ $TYPE == "style" ]]; then
exit 0
fi

make coverage

case $TEST in
python-api )
cd python-api
;;
server )
cd tools
;;
esac

coveralls $COVERALL_ARGS || {
printf "Coveralls failed!\n"
exit -1
}

61 changes: 12 additions & 49 deletions .travis-run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#! /bin/bash -ex

export DISPLAY=:99.0

./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
@@ -16,54 +14,19 @@ sudo make install || {
exit -1
}

cd python-api
export DISPLAY=:99.0
export GCOV_PREFIX=$TRAVIS_BUILD_DIR/gst-switch-coverage

case $TEST in

python-api )
case $TYPE in
unittest )
make unittests || {
printf "Unittests failed!\n"
exit -1
}
coveralls || {
printf "Coveralls failed!\n"
exit -1
}
;;
integration )
make integration || {
printf "Integration tests failed!\n"
exit -1
}
coveralls || {
printf "Coveralls failed!\n"
exit -1
}
;;
esac
cd python-api
make $TYPE
;;
module )
case $TYPE in
python )
make test || {
printf "Tests failed!\n"
exit -1
}
coveralls || {
printf "Coveralls failed!\n"
exit -1
}
;;
c )
make test || {
printf "Tests failed!\n"
exit -1
}
coveralls -n -r ../tools
esac
esac || {
printf "Failed!\n!\n"
exit -1
}
server )
make $TYPE
;;
* )
echo "Unknown TEST='$TEST'"
exit -1
;;
esac
10 changes: 7 additions & 3 deletions .travis-setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -20,11 +20,15 @@ sudo pip install pylint --upgrade
# Needed for tests
sudo apt-get -y install wget libav-tools

# Needed for style checks
sudo apt-get -y install indent

# Needed to get coverage output
if [ $TYPE == 'c' ]; then
sudo pip install cpp-coveralls
sudo apt-get -y install libyaml-dev
if [[ $TEST == "server" ]]; then
sudo pip install cpp-coveralls --upgrade
else
sudo pip install python-coveralls
sudo pip install python-coveralls --upgrade
fi

# Start an X server so the GUI works
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#vim :
language:
- c

@@ -6,10 +7,13 @@ compiler:

env:
matrix:
- TEST=python-api TYPE=unittest
- TEST=python-api TYPE=style
- TEST=python-api TYPE=unittests
- TEST=python-api TYPE=integration
- TEST=module TYPE=python
- TEST=module TYPE=c

- TEST=server TYPE=style
- TEST=server TYPE=unittests
- TEST=server TYPE=integration

install:
- wget -q -O- https://raw.githubusercontent.com/mithro/travis-trusty/master/setup.sh | bash
@@ -19,6 +23,9 @@ install:
script:
- /trusty/run.py $PWD/.travis-run.sh

after_script:
- /trusty/run.py $PWD/.travis-after.sh

notifications:
email:
- gst-switch-spam@googlegroups.com
17 changes: 17 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -39,7 +39,24 @@ endif
if GCOV_ENABLED
coverage:
$(MAKE) -C tools coverage
$(MAKE) -C tests/unit coverage
endif

style:
git status || true
git diff || true
git diff-files; echo $$?
git diff-files --quiet || (echo "Can only run make style on clean repo"; git status; git diff; git diff-files; exit 1)
@echo "--------------------------------------------------------"
@echo "--------------------------------------------------------"
for i in $$(find -name \*.c -o -name \*.h); do ./scripts/indent $$i; done
git diff
@echo "--------------------------------------------------------"
@echo "--------------------------------------------------------"
@git diff-files --quiet || (echo "Style errors found!"; exit 1)

integration:
$(MAKE) -C python-api integration

unittests:
$(MAKE) -C tests/unit check
22 changes: 13 additions & 9 deletions python-api/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: lint unittests pytest integration test clean all
.PHONY: lint pep8 style-check unittests integration performance test clean

lint: export PYTHONWARNINGS := ignore
lint: export PYTHONPATH := ${PYTHONPATH}:${PWD}
@@ -13,12 +13,6 @@ lint:
pylint --rcfile=.pylintrc_integrationtests tests/integrationtests/*.py
@echo "Code style is okay!!"

unittests:
@rm -rf reports
@mkdir -p reports/coverage/unittests
py.test --cov gstswitch tests/unittests/ --pep8 -v -s
#-@mv htmlcov/*.* reports/coverage/unittests

pep8:
pep8 gstswitch
@echo "gstswitch is pep8 clean!!"
@@ -27,10 +21,20 @@ pep8:
pep8 tests/integrationtests
@echo "integration tests are pep8 clean!!"

style: pep8 lint

imgurbash.sh:
-wget http://imgur.com/tools/imgurbash.sh -O imgurbash.sh
-chmod +x imgurbash.sh

unittests:
@rm -f ../tools/*.c.gcov
@rm -f ../tools/*.gcda
@rm -rf reports
@mkdir -p reports/coverage/unittests
py.test --cov gstswitch tests/unittests/ --pep8 -v -s
#-@mv htmlcov/*.* reports/coverage/unittests

integration: imgurbash.sh
@rm -f ../tools/*.c.gcov
@rm -f ../tools/*.gcda
@@ -43,6 +47,8 @@ performance:
py.test tests/performancetests/*.py -v -s
make clean

test: unittests integration

clean:
rm -f *.avi*
rm -f *.data*
@@ -53,5 +59,3 @@ clean:
rm -f tests/integrationtests/*.data
rm -rf .cache
rm -rf reports

test: pep8 lint unittests integration clean
1 change: 1 addition & 0 deletions scripts/apps/app_indent.sh
Original file line number Diff line number Diff line change
@@ -19,4 +19,5 @@ function main()
--leave-preprocessor-space"

$INDENT ${INDENT_PARAMETERS} "$@"
$INDENT ${INDENT_PARAMETERS} "$@"
}
19 changes: 17 additions & 2 deletions tests/unit/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
if GCOV_ENABLED
# --coverage
GCOV_CFLAGS = -fprofile-arcs -ftest-coverage
GCOV_LFLAGS = -fprofile-arcs -ftest-coverage
#GCOV_CFLAGS = --coverage
#GCOV_LFLAGS = --coverage
else
GCOV_CFLAGS =
GCOV_LFLAGS =
endif

include $(top_srcdir)/build/glib-tap.mk

LDADD = $(GTK_LIBS) $(GLIB_LIBS) $(GST_LIBS)

AM_CFLAGS = $(GLIB_CFLAGS) $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) $(X_CFLAGS) $(GTK_CFLAGS) \
$(GCOV_CFLAGS) \
-DLOG_PREFIX="\"./tests/unit\""
LDADD = $(GLIB_LIBS) $(GST_LIBS) $(X_LIBS) $(LIBM) $(GTK_LIBS)

test_gstswitchopts_SOURCES = test_gstswitchopts.c
test_gstswitchopts_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
@@ -15,7 +31,6 @@ test_gst_pipeline_string_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) \
$(GCOV_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) -DLOG_PREFIX="\"./tests\""
test_gst_pipeline_string_LDFLAGS = $(GCOV_LFLAGS)


dist_test_data = \
$(NULL)