perl: Fix test case bug perl#15544: Don't fail with PATH >1000 chars (#26245)

Fix the perl test case bug Perl/perl5#15544
Variable PATH longer than 1000 characters (as is usual with spack) fails a perl test case
The fix is: Don't test PATH in testcase perlbug.t
Fixes `spack install --test=all` for specs triggering a build and test of perl!
This commit is contained in:
bernhardkaindl 2021-09-27 15:18:36 +02:00 committed by GitHub
parent 2acfe55b74
commit 4a130b9185
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,6 +129,11 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
phases = ['configure', 'build', 'install'] phases = ['configure', 'build', 'install']
def patch(self):
# https://github.com/Perl/perl5/issues/15544 long PATH(>1000 chars) fails a test
os.chmod('lib/perlbug.t', 0o644)
filter_file('!/$B/', '! (/(?:$B|PATH)/)', 'lib/perlbug.t')
@classmethod @classmethod
def determine_version(cls, exe): def determine_version(cls, exe):
perl = spack.util.executable.Executable(exe) perl = spack.util.executable.Executable(exe)