WEBGUI_CONFIG and --configFile options work together
This commit is contained in:
parent
734ef2fc1e
commit
7d1dfed519
1 changed files with 13 additions and 9 deletions
|
|
@ -11,8 +11,8 @@
|
||||||
$|=1;
|
$|=1;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use lib '../lib';
|
use FindBin;
|
||||||
use File::Find;
|
use lib "$FindBin::Bin/../t/lib";
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
||||||
my $configFile;
|
my $configFile;
|
||||||
|
|
@ -25,8 +25,7 @@ GetOptions(
|
||||||
'help'=>\$help
|
'help'=>\$help
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($help || !$configFile) {
|
my $helpmsg=<<STOP;
|
||||||
print <<STOP;
|
|
||||||
|
|
||||||
perl $0 --configFile
|
perl $0 --configFile
|
||||||
|
|
||||||
|
|
@ -38,11 +37,16 @@ if ($help || !$configFile) {
|
||||||
--verbose Turns on additional output.
|
--verbose Turns on additional output.
|
||||||
|
|
||||||
STOP
|
STOP
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $verboseFlag = "-v" if ($verbose);
|
my $verboseFlag = "-v" if ($verbose);
|
||||||
system("WEBGUI_LIB=../lib WEBGUI_CONFIG=../etc/".$configFile." prove ".$verboseFlag." -r ../t");
|
my $config = $ENV{WEBGUI_CONFIG};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ( $configFile ) {
|
||||||
|
system("WEBGUI_CONFIG=".$configFile." prove ".$verboseFlag." -r ../t");
|
||||||
|
exit;
|
||||||
|
} elsif ( defined @ENV{WEBGUI_CONFIG} ) {
|
||||||
|
system("prove ".$verboseFlag." -r ../t");
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
print $helpmsg;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue