Skip to content

Commit

Permalink
Merge remote-tracking branch 'mithro/g_error_free' into console
Browse files Browse the repository at this point in the history
  • Loading branch information
hyades committed Jan 6, 2015
2 parents 296d13d + 346a73e commit b5336ef
Show file tree
Hide file tree
Showing 18 changed files with 1,059 additions and 232 deletions.
14 changes: 14 additions & 0 deletions .travis-run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#! /bin/bash -ex

./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
}
make clean
make || {
printf "make of gst-switch failed!!!\n"
exit -1
}
sudo make install || {
printf "make install of gst-switch failed!!!\n"
exit -1
}

cd python-api

case $TEST in
Expand Down
159 changes: 16 additions & 143 deletions .travis-setup.sh
Original file line number Diff line number Diff line change
@@ -1,153 +1,26 @@
#! /bin/bash -ex

sudo apt-get update
# Update / upgrade everything
sudo apt-get -y update && sudo apt-get -y upgrade

# gst-switch compile stuff
sudo apt-get -y install build-essential dh-autoreconf
sudo apt-get -y install libgtk-3-dev
sudo apt-get -y install gstreamer1.0.* libgstreamer.*1.0.*

# Python stuff for gst-switch API
sudo apt-get -y install python-software-properties python-pip
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 python-scipy
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/
export GCOV_PREFIX=$HOME/gst-switch-coverage
cd ..
git clone http://git.chromium.org/webm/libvpx.git
cd libvpx
git checkout v1.2.0
./configure --enable-shared --enable-vp8 --prefix=/usr
[[ -f Makefile ]] || {
printf "Configure libvpx failed, no Makefile generated!!!\n"
exit -1
}
make
sudo make install || {
printf "make install of libvpx failed!!!\n"
exit -1
}
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gstreamer
cd gstreamer
git checkout 6c11da1
./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
}
[[ -f Makefile ]] || {
printf "Configure gstreamer failed, no Makefile generated!!!\n"
exit -1
}
make clean
make || {
printf "make of $project failed!!!\n"
exit -1
}
sudo make install || {
printf "make install of gstreamer failed!!!\n"
exit -1
}
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-base
cd gst-plugins-base
git checkout a8df760
./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
}
[[ -f Makefile ]] || {
printf "Configure gst-plugins-base failed, no Makefile generated!!!\n"
exit -1
}
make clean
make || {
printf "make of gst-plugins-base failed!!!\n"
exit -1
}
sudo make install || {
printf "make install of $project failed!!!\n"
exit -1
}
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-good
cd gst-plugins-good
git checkout d14d4c4
./autogen.sh --enable-experimental --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
}
[[ -f Makefile ]] || {
printf "Configure gst-plugins-good failed, no Makefile generated!!!\n"
exit -1
}
make clean
make || {
printf "make of gst-plugins-good failed!!!\n"
exit -1
}
sudo make install || {
printf "make install of $project failed!!!\n"
exit -1
}
cd ..
git clone git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly
cd gst-plugins-ugly
git checkout 68985ba
./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
}
[[ -f Makefile ]] || {
printf "Configure gst-plugins-ugly failed, no Makefile generated!!!\n"
exit -1
}
make clean
make || {
printf "make of gst-plugins-ugly failed!!!\n"
exit -1
}
sudo make install || {
printf "make install of gst-plugins-ugly failed!!!\n"
exit -1
}
cd ..
git clone https://github.com/hyades/gst-plugins-bad.git
cd gst-plugins-bad
./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
}
[[ -f Makefile ]] || {
printf "Configure gst-plugins-bad failed, no Makefile generated!!!\n"
exit -1
}
make clean
make || {
printf "make of gst-plugins-bad failed!!!\n"
exit -1
}
sudo make install || {
printf "make install of gst-plugins-bad failed!!!\n"
exit -1
}
cd ..
cd gst-switch
./autogen.sh --prefix=/usr || {
printf "Failed to do autogen!!!\n"
exit -1
}
make clean
make|| {
printf "make of gstswitch failed!!!\n"
exit -1
}
sudo make install || {
printf "make install of gstswitch failed!!!\n"
exit -1
}

# Needed for tests
sudo apt-get -y install wget libav-tools

# Needed to get coverage output
if [ $TYPE == 'c' ]; then
sudo pip install cpp-coveralls
else
Expand Down
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ env:
- TEST=python-api TYPE=integration
- TEST=module TYPE=python
- TEST=module TYPE=c

install:
- chmod +x .travis-setup.sh
- ./.travis-setup.sh
- wget -q -O- https://raw.githubusercontent.com/mithro/travis-trusty/master/setup.sh | bash
- chmod a+rx $PWD/.travis-*.sh
- /trusty/run.py $PWD/.travis-setup.sh

script:
- chmod +x .travis-run.sh
- ./.travis-run.sh
- /trusty/run.py $PWD/.travis-run.sh

notifications:
email:
Expand Down
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SUBDIRS = plugins tools tests
SUBDIRS = plugins tools tests/unit tests

EXTRA_DIST = autogen.sh

ACLOCAL_AMFLAGS = -I m4
ACLOCAL_AMFLAGS = -I build

include tests/names.mk
test: update-test-suite clean-test-data $(TESTS)
Expand Down
File renamed without changes.
33 changes: 33 additions & 0 deletions build/Makefile.am.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# this file should only be used in directories that generate test
# or example binaries through noinst_PROGRAMS; it is *not* a full
# generator of Git ignore files, and it's not meant to be used as
# the top-level Git ignore file generator.

$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/build/Makefile.am.gitignore
$(AM_V_GEN)( \
echo "*.o" ; \
echo ".gitignore" ; \
echo "*.trs" ; \
echo "*.log" ; \
echo "Makefile" ; \
echo "Makefile.in" ; \
echo ".deps" ; \
) > $(srcdir)/.gitignore ; \
for p in $(noinst_PROGRAMS); do \
echo "/$$p" >> $(srcdir)/.gitignore ; \
done ; \
for p in $(check_PROGRAMS); do \
echo "/$$p" >> $(srcdir)/.gitignore ; \
done


gitignore: $(srcdir)/.gitignore

gitignore-clean:
@rm -f $(srcdir)/.gitignore

.PHONY: gitignore gitignore-clean

all: gitignore

maintainer-clean: gitignore-clean
6 changes: 6 additions & 0 deletions build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

* [glib-tap.mk](https://git.gnome.org/browse/glib/tree/glib-tap.mk?id=7f2f4ab12df6ddb501900846896f496520871d16) (modified)
* [glibtests.m4](https://git.gnome.org/browse/glib/tree/m4macros/glibtests.m4?id=7f2f4ab12df6ddb501900846896f496520871d16)
* [tap-driver.sh](https://git.gnome.org/browse/glib/tree/tap-driver.sh?id=7f2f4ab12df6ddb501900846896f496520871d16)
* [tap-test](https://git.gnome.org/browse/glib/tree/tap-driver.sh?id=7f2f4ab12df6ddb501900846896f496520871d16)
* [Makefile.am.gitignore](https://git.gnome.org/browse/json-glib/tree/build/autotools/Makefile.am.gitignore?id=4ccb9ab6119b81dde81b04208b98c89fc3a7884c) (modified)
135 changes: 135 additions & 0 deletions build/glib-tap.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# GLIB - Library of useful C routines

TESTS_ENVIRONMENT= \
G_TEST_SRCDIR="$(abs_srcdir)" \
G_TEST_BUILDDIR="$(abs_builddir)" \
G_DEBUG=gc-friendly \
MALLOC_CHECK_=2 \
MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/build/tap-driver.sh
LOG_COMPILER = $(top_srcdir)/build/tap-test

NULL =

# initialize variables for unconditional += appending
BUILT_SOURCES =
BUILT_EXTRA_DIST =
CLEANFILES = *.log *.trs
DISTCLEANFILES =
MAINTAINERCLEANFILES =
EXTRA_DIST =
TESTS =

installed_test_LTLIBRARIES =
installed_test_PROGRAMS =
installed_test_SCRIPTS =
nobase_installed_test_DATA =

noinst_LTLIBRARIES =
noinst_PROGRAMS =
noinst_SCRIPTS =
noinst_DATA =

check_LTLIBRARIES =
check_PROGRAMS =
check_SCRIPTS =
check_DATA =

# We support a fairly large range of possible variables. It is expected that all types of files in a test suite
# will belong in exactly one of the following variables.
#
# First, we support the usual automake suffixes, but in lowercase, with the customary meaning:
#
# test_programs, test_scripts, test_data, test_ltlibraries
#
# The above are used to list files that are involved in both uninstalled and installed testing. The
# test_programs and test_scripts are taken to be actual testcases and will be run as part of the test suite.
# Note that _data is always used with the nobase_ automake variable name to ensure that installed test data is
# installed in the same way as it appears in the package layout.
#
# In order to mark a particular file as being only for one type of testing, use 'installed' or 'uninstalled',
# like so:
#
# installed_test_programs, uninstalled_test_programs
# installed_test_scripts, uninstalled_test_scripts
# installed_test_data, uninstalled_test_data
# installed_test_ltlibraries, uninstalled_test_ltlibraries
#
# Additionally, we support 'extra' infixes for programs and scripts. This is used for support programs/scripts
# that should not themselves be run as testcases (but exist to be used from other testcases):
#
# test_extra_programs, installed_test_extra_programs, uninstalled_test_extra_programs
# test_extra_scripts, installed_test_extra_scripts, uninstalled_test_extra_scripts
#
# Additionally, for _scripts and _data, we support the customary dist_ prefix so that the named script or data
# file automatically end up in the tarball.
#
# dist_test_scripts, dist_test_data, dist_test_extra_scripts
# dist_installed_test_scripts, dist_installed_test_data, dist_installed_test_extra_scripts
# dist_uninstalled_test_scripts, dist_uninstalled_test_data, dist_uninstalled_test_extra_scripts
#
# Note that no file is automatically disted unless it appears in one of the dist_ variables. This follows the
# standard automake convention of not disting programs scripts or data by default.
#
# test_programs, test_scripts, uninstalled_test_programs and uninstalled_test_scripts (as well as their disted
# variants) will be run as part of the in-tree 'make check'. These are all assumed to be runnable under
# gtester. That's a bit strange for scripts, but it's possible.

TESTS += $(test_programs) $(test_scripts) $(uninstalled_test_programs) $(uninstalled_test_scripts) \
$(dist_test_scripts) $(dist_uninstalled_test_scripts)

# Note: build even the installed-only targets during 'make check' to ensure that they still work.
# We need to do a bit of trickery here and manage disting via EXTRA_DIST instead of using dist_ prefixes to
# prevent automake from mistreating gmake functions like $(wildcard ...) and $(addprefix ...) as if they were
# filenames, including removing duplicate instances of the opening part before the space, eg. '$(addprefix'.
all_test_programs = $(test_programs) $(uninstalled_test_programs) $(installed_test_programs) \
$(test_extra_programs) $(uninstalled_test_extra_programs) $(installed_test_extra_programs)
all_test_scripts = $(test_scripts) $(uninstalled_test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(uninstalled_test_extra_scripts) $(installed_test_extra_scripts)
all_dist_test_scripts = $(dist_test_scripts) $(dist_uninstalled_test_scripts) $(dist_installed_test_scripts) \
$(dist_test_extra_scripts) $(dist_uninstalled_test_extra_scripts) $(dist_installed_test_extra_scripts)
all_test_scripts += $(all_dist_test_scripts)
EXTRA_DIST += $(all_dist_test_scripts)
all_test_data = $(test_data) $(uninstalled_test_data) $(installed_test_data)
all_dist_test_data = $(dist_test_data) $(dist_uninstalled_test_data) $(dist_installed_test_data)
all_test_data += $(all_dist_test_data)
EXTRA_DIST += $(all_dist_test_data)
all_test_ltlibs = $(test_ltlibraries) $(uninstalled_test_ltlibraries) $(installed_test_ltlibraries)

if ENABLE_ALWAYS_BUILD_TESTS
noinst_LTLIBRARIES += $(all_test_ltlibs)
noinst_PROGRAMS += $(all_test_programs)
noinst_SCRIPTS += $(all_test_scripts)
noinst_DATA += $(all_test_data)
else
check_LTLIBRARIES += $(all_test_ltlibs)
check_PROGRAMS += $(all_test_programs)
check_SCRIPTS += $(all_test_scripts)
check_DATA += $(all_test_data)
endif

if ENABLE_INSTALLED_TESTS
installed_test_PROGRAMS += $(test_programs) $(installed_test_programs) \
$(test_extra_programs) $(installed_test_extra_programs)
installed_test_SCRIPTS += $(test_scripts) $(installed_test_scripts) \
$(test_extra_scripts) $(test_installed_extra_scripts)
installed_test_SCRIPTS += $(dist_test_scripts) $(dist_test_extra_scripts) \
$(dist_installed_test_scripts) $(dist_installed_test_extra_scripts)
nobase_installed_test_DATA += $(test_data) $(installed_test_data)
nobase_installed_test_DATA += $(dist_test_data) $(dist_installed_test_data)
installed_test_LTLIBRARIES += $(test_ltlibraries) $(installed_test_ltlibraries)
installed_testcases = $(test_programs) $(installed_test_programs) \
$(test_scripts) $(installed_test_scripts) \
$(dist_test_scripts) $(dist_installed_test_scripts)

installed_test_meta_DATA = $(installed_testcases:=.test)

%.test: %$(EXEEXT) Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Exec=$(installed_testdir)/$(notdir $<) --tap' >> $@.tmp; \
echo 'Output=TAP' >> $@.tmp; \
mv $@.tmp $@)

CLEANFILES += $(installed_test_meta_DATA)
endif
Loading

0 comments on commit b5336ef

Please sign in to comment.