From: Stefan Kost Date: Tue, 26 Apr 2011 10:44:04 +0000 (+0300) Subject: element-maker-test: try to run element-maker for all templates X-Git-Tag: 1.19.3~507^2~16050^2~295 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1e91cb1685acb56d8a33290a27dcb8cbd3378c7;p=platform%2Fupstream%2Fgstreamer.git element-maker-test: try to run element-maker for all templates Add an easy way to check the element-maker templates. --- diff --git a/tools/Makefile.am b/tools/Makefile.am index 9db79a03fe..aa32d875f9 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -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 diff --git a/tools/gst-element-maker-test.sh b/tools/gst-element-maker-test.sh new file mode 100755 index 0000000000..fdd9bf3b35 --- /dev/null +++ b/tools/gst-element-maker-test.sh @@ -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; +