#------------------------------------------------------------------- # WebGUI is Copyright 2001-2006 Plain Black Corporation. #------------------------------------------------------------------- # Please read the legal notices (docs/legal.txt) and the license # (docs/license.txt) that came with this distribution before using # this software. #------------------------------------------------------------------- # http://www.plainblack.com info@plainblack.com #------------------------------------------------------------------- $|=1; use strict; use FindBin; use lib "$FindBin::Bin/../t/lib"; use File::Spec qw[]; use Getopt::Long; my $configFile; my $help; my $verbose; my $perlBase; my $noLongTests; my $coverage; GetOptions( 'verbose'=>\$verbose, 'configFile=s'=>\$configFile, 'perlBase=s'=>\$perlBase, 'noLongTests'=>\$noLongTests, 'help'=>\$help, 'coverage'=>\$coverage, ); my $helpmsg=<canonpath($FindBin::Bin.'/../etc/'.$configFile); } die "Unable to use $configFile as a WebGUI config file\n" unless(-e $configFile and -f _); my $prefix = "WEBGUI_CONFIG=".$configFile; ##Run all tests unless explicitly forbidden $prefix .= " CODE_COP=1" unless $noLongTests; # Add coverage tests $prefix .= " PERL5OPT='-MDevel::Cover=-db,/tmp/coverdb'" if $coverage; print(join ' ', $prefix, $perlBase."prove", $verboseFlag, '-r ../t'); print "\n"; system(join ' ', $prefix, $perlBase."prove", $verboseFlag, '-r ../t');