diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 9 | ||||
-rwxr-xr-x | tools/gst-element-maker-test.sh | 20 |
2 files changed, 28 insertions, 1 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index 9db79a03f..aa32d875f 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 000000000..fdd9bf3b3 --- /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; + |