Added an option to select a arbitrary perl install.
This commit is contained in:
parent
72b999b0ea
commit
f5e70f74b0
1 changed files with 11 additions and 3 deletions
|
|
@ -18,11 +18,13 @@ use Getopt::Long;
|
||||||
my $configFile;
|
my $configFile;
|
||||||
my $help;
|
my $help;
|
||||||
my $verbose;
|
my $verbose;
|
||||||
|
my $perlBase;
|
||||||
|
|
||||||
GetOptions(
|
GetOptions(
|
||||||
'verbose'=>\$verbose,
|
'verbose'=>\$verbose,
|
||||||
'configFile=s'=>\$configFile,
|
'configFile=s'=>\$configFile,
|
||||||
'help'=>\$help
|
'perl-base=s'=>\$perlBase,
|
||||||
|
'help'=>\$help,
|
||||||
);
|
);
|
||||||
|
|
||||||
my $helpmsg=<<STOP;
|
my $helpmsg=<<STOP;
|
||||||
|
|
@ -36,16 +38,22 @@ my $helpmsg=<<STOP;
|
||||||
|
|
||||||
--verbose Turns on additional output.
|
--verbose Turns on additional output.
|
||||||
|
|
||||||
|
--perl-base The path of the perl installation you want to
|
||||||
|
use. Defaults to the perl installation in your
|
||||||
|
PATH.
|
||||||
|
|
||||||
STOP
|
STOP
|
||||||
|
|
||||||
my $verboseFlag = "-v" if ($verbose);
|
my $verboseFlag = "-v" if ($verbose);
|
||||||
my $config = $ENV{WEBGUI_CONFIG};
|
my $config = $ENV{WEBGUI_CONFIG};
|
||||||
|
|
||||||
|
$perlBase .= '/bin/' if ($perlBase);
|
||||||
|
|
||||||
if ( $configFile ) {
|
if ( $configFile ) {
|
||||||
system("WEBGUI_CONFIG=".$configFile." prove ".$verboseFlag." -r ../t");
|
system("WEBGUI_CONFIG=".$configFile." ".$perlBase."prove ".$verboseFlag." -r ../t");
|
||||||
exit;
|
exit;
|
||||||
} elsif ( defined @ENV{WEBGUI_CONFIG} ) {
|
} elsif ( defined @ENV{WEBGUI_CONFIG} ) {
|
||||||
system("prove ".$verboseFlag." -r ../t");
|
system($perlBase."prove ".$verboseFlag." -r ../t");
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
print $helpmsg;
|
print $helpmsg;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue