Revert "Revert "only use ND_PHANTOMJS env for testing""

This reverts commit ffd5c07b41.
This commit is contained in:
Oliver Gorwits
2018-01-06 13:57:53 +00:00
parent 6b8da71c11
commit eef519ef93

View File

@@ -6,12 +6,11 @@ use Test::More;
use Env::Path;
use FindBin qw( $Bin );
my @phantomjs = Env::Path->PATH->Whence('phantomjs');
my $phantomjs = scalar @phantomjs ? $phantomjs[0] : $ENV{ND_PHANTOMJS};
my $phantomjs = $ENV{ND_PHANTOMJS};
if ( ! defined $phantomjs or !-x $phantomjs ) {
if ( !defined $phantomjs or !-x $phantomjs ) {
plan skip_all =>
"phantomjs not found, please set ND_PHANTOMJS or install phantomjs to the default location";
"phantomjs not found, please set ND_PHANTOMJS to the location of the phantomjs executable";
}
else {
exec( $phantomjs, "$Bin/js/run_qunit.js", "$Bin/html/portsort.html" );