git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4937bfb
)
videosite-test: Allow selective tests by using grabber names on the command line
author
Ralf Ertzinger
<ralf@skytale.net>
Tue, 30 Apr 2013 18:58:47 +0000
(20:58 +0200)
committer
Ralf Ertzinger
<ralf@skytale.net>
Tue, 30 Apr 2013 18:58:47 +0000
(20:58 +0200)
videosite-test.pl
patch
|
blob
|
history
diff --git
a/videosite-test.pl
b/videosite-test.pl
index
bfea2f2
..
0d9e771
100755
(executable)
--- a/
videosite-test.pl
+++ b/
videosite-test.pl
@@
-32,11
+32,23
@@
unless(libvideosite::init()) {
select(STDOUT);
$| = 1;
printf("Doing self tests:\n");
select(STDOUT);
$| = 1;
printf("Doing self tests:\n");
-foreach (libvideosite::_grabbers()) {
+foreach
my $g
(libvideosite::_grabbers()) {
my $r;
my $r;
- printf(" %s...", $_->{'NAME'});
- $r = $_->_selftest();
+ if (@ARGV) {
+ my $found;
+
+ # If there are grabber names given on the command line check
+ # the current name against that list and skip if not present
+ $found = grep { $_ eq $g->{'NAME'} } @ARGV;
+
+ if ($found == 0) {
+ next;
+ }
+ }
+
+ printf(" %s...", $g->{'NAME'});
+ $r = $g->_selftest();
if(defined($r)) {
if ($r == 1) {
printf(" OK\n");
if(defined($r)) {
if ($r == 1) {
printf(" OK\n");