comparison lib/Test/Nginx.pm @ 856:d39e98893265

Tests: use TEST_NGINX_MODULES to find dynamic modules directory. If not specified, fallback to dirname of TEST_NGINX_BINARY. Either way, the path is normalised to an absolute one for use in "load_module".
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 16 Feb 2016 18:41:31 +0300
parents b237eda210e3
children 6868e610eacc
comparison
equal deleted inserted replaced
855:47d64d2fd68d 856:d39e98893265
457 } 457 }
458 458
459 sub test_globals_modules() { 459 sub test_globals_modules() {
460 my ($self) = @_; 460 my ($self) = @_;
461 461
462 my $modules = File::Spec->rel2abs((File::Spec->splitpath($NGINX))[1]); 462 my $modules = $ENV{TEST_NGINX_MODULES};
463
464 if (!defined $modules) {
465 my ($volume, $dir) = File::Spec->splitpath($NGINX);
466 $modules = File::Spec->catpath($volume, $dir, '');
467 }
468
469 $modules = File::Spec->rel2abs($modules);
463 $modules =~ s!\\!/!g if $^O eq 'MSWin32'; 470 $modules =~ s!\\!/!g if $^O eq 'MSWin32';
464 471
465 my $s = ''; 472 my $s = '';
466 473
467 $s .= "load_module $modules/ngx_http_image_filter_module.so;\n" 474 $s .= "load_module $modules/ngx_http_image_filter_module.so;\n"