element-maker-test: try to run element-maker for all templates

Add an easy way to check the element-maker templates.
This commit is contained in:
Stefan Kost 2011-04-26 13:44:04 +03:00
parent e32a6f9471
commit c1e91cb168
2 changed files with 28 additions and 1 deletions

View file

@ -26,5 +26,12 @@ templatefiles=\
EXTRA_DIST = \
gst-element-maker \
gst-app-maker \
$(templatefiles)
$(templatefiles) \
gst-element-maker-test.sh
TESTS_ENVIRONMENT = \
SRC_DIR=$(abs_srcdir) \
TEMPLATE_FILES="$(templatefiles)"
TESTS = gst-element-maker-test.sh

20
tools/gst-element-maker-test.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
tmpdir=`mktemp --tmpdir -d gst.XXXXXXXXXX`
workdir=$PWD
cd $tmpdir
res=0
for file in $TEMPLATE_FILES; do
name=`basename $file element-templates`
$SRC_DIR/gst-element-maker gst$name $name
if test $? -ne 0; then
res=1
break
fi
done
cd $workdir
rm -rf $tmpdir
exit $res;