Perl5-Alien / Alien-Base

Base classes for Alien:: modules (deprecated, see Alien-Build)
Other
35 stars 19 forks source link

ACTION_test: fix testing when using a system library #145

Closed salva closed 8 years ago

salva commented 8 years ago

The ACTION_test method was trying to run the library test suit even when a system library has been detected (and so, no library was actually compiled).

salva commented 8 years ago

@plicease: Looking if $self->config('working_directory') is defined seems to be a cheap way to detect if the library has been actually unpacked, but maybe a better and more clear approach could be used...

Actually, wouldn't it be better to determine at Build.PL time if a system library is available and !$Force and store that information into the configuration so it is guaranteed to be the same on all the stages? (currently it is recalculated in every stage).

plicease commented 8 years ago

I think the check should be on $amb->install_type == 'share'

plicease commented 8 years ago

Yeah, I think it might be an improvement to do it at Build.PL time. I do want to at least have the check on install type in the test action, even if we do end up checking the existence of the directory too.

salva commented 8 years ago

ok, let me resubmit this patch using also the $amb->install_type == 'share' check