From 3f812f873f544320514c68a2224f16f9bfa0d88c Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Thu, 25 Mar 2004 00:32:19 +0000 Subject: [PATCH] testsuite/elements/: add check to make sure gst-compprep works Original commit message from CVS: * testsuite/elements/Makefile.am: * testsuite/elements/gst-compprep-check: add check to make sure gst-compprep works * testsuite/elements/gst-inspect-check.in: improve initialization output * testsuite/gst-inspect-check: remove old file --- ChangeLog | 10 +++ tests/old/testsuite/elements/Makefile.am | 5 +- .../testsuite/elements/gst-compprep-check.in | 3 + .../testsuite/elements/gst-inspect-check.in | 8 +- tests/old/testsuite/gst-inspect-check | 76 ------------------- testsuite/elements/Makefile.am | 5 +- testsuite/elements/gst-compprep-check.in | 3 + testsuite/elements/gst-inspect-check.in | 8 +- testsuite/gst-inspect-check | 76 ------------------- 9 files changed, 38 insertions(+), 156 deletions(-) create mode 100755 tests/old/testsuite/elements/gst-compprep-check.in delete mode 100755 tests/old/testsuite/gst-inspect-check create mode 100755 testsuite/elements/gst-compprep-check.in delete mode 100755 testsuite/gst-inspect-check diff --git a/ChangeLog b/ChangeLog index 6e99b4c151..222ab174ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-03-25 Benjamin Otte + + * testsuite/elements/Makefile.am: + * testsuite/elements/gst-compprep-check: + add check to make sure gst-compprep works + * testsuite/elements/gst-inspect-check.in: + improve initialization output + * testsuite/gst-inspect-check: + remove old file + 2004-03-24 David Schleef * testsuite/elements/Makefile.am: diff --git a/tests/old/testsuite/elements/Makefile.am b/tests/old/testsuite/elements/Makefile.am index eff137612a..6200421a06 100644 --- a/tests/old/testsuite/elements/Makefile.am +++ b/tests/old/testsuite/elements/Makefile.am @@ -1,6 +1,6 @@ include ../Rules -tests_pass = name tee property fake gst-inspect-check +tests_pass = name tee property fake gst-inspect-check gst-compprep-check tests_fail = noinst_HEADERS = property.h @@ -11,3 +11,6 @@ gst-inspect-check: $(srcdir)/gst-inspect-check.in $(srcdir)/gst-inspect-check.in >gst-inspect-check chmod +x gst-inspect-check +gst-compprep-check: + true + diff --git a/tests/old/testsuite/elements/gst-compprep-check.in b/tests/old/testsuite/elements/gst-compprep-check.in new file mode 100755 index 0000000000..c5a2cf42f9 --- /dev/null +++ b/tests/old/testsuite/elements/gst-compprep-check.in @@ -0,0 +1,3 @@ +#!/bin/sh + +../../tools/gst-compprep --gst-fatal-warnings diff --git a/tests/old/testsuite/elements/gst-inspect-check.in b/tests/old/testsuite/elements/gst-inspect-check.in index f86a1d604b..55b5cdb1ac 100755 --- a/tests/old/testsuite/elements/gst-inspect-check.in +++ b/tests/old/testsuite/elements/gst-inspect-check.in @@ -7,7 +7,13 @@ use File::Basename; -print "moo\n"; +print " _______\n"; +print " (__) / \\\n"; +print " (oo) ( M O O )\n"; +print " /-------\\/ --'\\_______/\n"; +print " / | ||\n"; +print "* ||----||\n"; +print " ^^ ^^\n"; my $num_warnings = 0; my $path = `dirname $0`; diff --git a/tests/old/testsuite/gst-inspect-check b/tests/old/testsuite/gst-inspect-check deleted file mode 100755 index 38586412b3..0000000000 --- a/tests/old/testsuite/gst-inspect-check +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/perl -w - -# checks all built plugins by running gst-inspect on each element -# and checking for warnings on stderr - -### packages - -use File::Basename; - -my $num_warnings = 0; -my $path = `dirname $0`; -chomp $path; -$path .= "/../tools"; - -sub check_all_elements -{ - #send stderr to /dev/null - my $command = "$path/gst-inspect 2>/dev/null"; - my @lines = `$command`; - - while ($_ = shift(@lines)){ - my @matches = m/^\w+:\s+(\w+):/; - if(@matches){ - check_element($matches[0]); - } - } - if ($num_warnings > 0){ - print("there are $num_warnings warnings to be fixed\n"); - return -1; - } - return 0; -} - -sub check_element($) -{ - my ($element) = @_; - print "running inspect on $element\n"; - - # capture stderr, send stdout to /dev/null - my $command = "$path/gst-inspect $element 2>&1 1>/dev/null"; - - my @lines = `$command`; - - while ($_ = shift(@lines)){ - # ignore INFO lines, they are ok - if (! /INFO/){ - print $_; - - # do this to ignore empty lines - if (length > 1){ - $num_warnings++; - } - } - } - system("gst-inspect $element 2>/dev/null 1>/dev/null"); - if ($? != 0){ - my $exit_value = $? >> 8; - my $signal_num = $? & 127; - my $dumped_core = $? & 128; - if ($exit_value){ - print("error value on exit: $exit_value\n"); - } - if ($signal_num){ - print("signal caused exit: $signal_num\n"); - } - if ($dumped_core){ - print("dumped core: $dumped_core\n"); - } - $num_warnings++ - } -} - -### main - -exit check_all_elements (); - diff --git a/testsuite/elements/Makefile.am b/testsuite/elements/Makefile.am index eff137612a..6200421a06 100644 --- a/testsuite/elements/Makefile.am +++ b/testsuite/elements/Makefile.am @@ -1,6 +1,6 @@ include ../Rules -tests_pass = name tee property fake gst-inspect-check +tests_pass = name tee property fake gst-inspect-check gst-compprep-check tests_fail = noinst_HEADERS = property.h @@ -11,3 +11,6 @@ gst-inspect-check: $(srcdir)/gst-inspect-check.in $(srcdir)/gst-inspect-check.in >gst-inspect-check chmod +x gst-inspect-check +gst-compprep-check: + true + diff --git a/testsuite/elements/gst-compprep-check.in b/testsuite/elements/gst-compprep-check.in new file mode 100755 index 0000000000..c5a2cf42f9 --- /dev/null +++ b/testsuite/elements/gst-compprep-check.in @@ -0,0 +1,3 @@ +#!/bin/sh + +../../tools/gst-compprep --gst-fatal-warnings diff --git a/testsuite/elements/gst-inspect-check.in b/testsuite/elements/gst-inspect-check.in index f86a1d604b..55b5cdb1ac 100755 --- a/testsuite/elements/gst-inspect-check.in +++ b/testsuite/elements/gst-inspect-check.in @@ -7,7 +7,13 @@ use File::Basename; -print "moo\n"; +print " _______\n"; +print " (__) / \\\n"; +print " (oo) ( M O O )\n"; +print " /-------\\/ --'\\_______/\n"; +print " / | ||\n"; +print "* ||----||\n"; +print " ^^ ^^\n"; my $num_warnings = 0; my $path = `dirname $0`; diff --git a/testsuite/gst-inspect-check b/testsuite/gst-inspect-check deleted file mode 100755 index 38586412b3..0000000000 --- a/testsuite/gst-inspect-check +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/perl -w - -# checks all built plugins by running gst-inspect on each element -# and checking for warnings on stderr - -### packages - -use File::Basename; - -my $num_warnings = 0; -my $path = `dirname $0`; -chomp $path; -$path .= "/../tools"; - -sub check_all_elements -{ - #send stderr to /dev/null - my $command = "$path/gst-inspect 2>/dev/null"; - my @lines = `$command`; - - while ($_ = shift(@lines)){ - my @matches = m/^\w+:\s+(\w+):/; - if(@matches){ - check_element($matches[0]); - } - } - if ($num_warnings > 0){ - print("there are $num_warnings warnings to be fixed\n"); - return -1; - } - return 0; -} - -sub check_element($) -{ - my ($element) = @_; - print "running inspect on $element\n"; - - # capture stderr, send stdout to /dev/null - my $command = "$path/gst-inspect $element 2>&1 1>/dev/null"; - - my @lines = `$command`; - - while ($_ = shift(@lines)){ - # ignore INFO lines, they are ok - if (! /INFO/){ - print $_; - - # do this to ignore empty lines - if (length > 1){ - $num_warnings++; - } - } - } - system("gst-inspect $element 2>/dev/null 1>/dev/null"); - if ($? != 0){ - my $exit_value = $? >> 8; - my $signal_num = $? & 127; - my $dumped_core = $? & 128; - if ($exit_value){ - print("error value on exit: $exit_value\n"); - } - if ($signal_num){ - print("signal caused exit: $signal_num\n"); - } - if ($dumped_core){ - print("dumped core: $dumped_core\n"); - } - $num_warnings++ - } -} - -### main - -exit check_all_elements (); -