diff options
author | bernhardkaindl <43588962+bernhardkaindl@users.noreply.github.com> | 2021-09-21 22:18:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-21 14:18:29 -0600 |
commit | 981551b47f2f1c702645992e1293e618c6d3ae66 (patch) | |
tree | 5a2d3184071556f143637de6496ca7a441dbd7d2 | |
parent | c3cb863b82926fd93623061871892cd17769e7e1 (diff) | |
download | spack-981551b47f2f1c702645992e1293e618c6d3ae66.tar.gz spack-981551b47f2f1c702645992e1293e618c6d3ae66.tar.bz2 spack-981551b47f2f1c702645992e1293e618c6d3ae66.tar.xz spack-981551b47f2f1c702645992e1293e618c6d3ae66.zip |
libtool: fix running the unit-tests with spack install --test root (#25707)
Besides adding autoconf and automake as needed for tests of 2.4.6,
skip Fortran test cases when Fortran compilers are not provided.
-rw-r--r-- | var/spack/repos/builtin/packages/libtool/package.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index a85d09e633..02c5e02304 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -10,7 +10,7 @@ class Libtool(AutotoolsPackage, GNUMirrorPackage): """libtool -- library building part of autotools.""" homepage = 'https://www.gnu.org/software/libtool/' - gnu_mirror_path = "libtool/libtool-2.4.2.tar.gz" + gnu_mirror_path = "libtool/libtool-2.4.6.tar.gz" version('develop', git='https://git.savannah.gnu.org/git/libtool.git', branch='master', submodules=True) @@ -25,6 +25,10 @@ class Libtool(AutotoolsPackage, GNUMirrorPackage): depends_on('automake', type='build') depends_on('help2man', type='build') + with when('@2.4.6'): + depends_on('autoconf@2.62:', type='test') + depends_on('automake', type='test') + with when('@develop'): depends_on('autoconf', type='build') depends_on('automake', type='build') @@ -92,3 +96,20 @@ class Libtool(AutotoolsPackage, GNUMirrorPackage): join_path(self.prefix.bin, 'glibtool')) symlink(join_path(self.prefix.bin, 'libtoolize'), join_path(self.prefix.bin, 'glibtoolize')) + + def setup_build_environment(self, env): + """Wrapper until spack has a real implementation of setup_test_environment()""" + if self.run_tests: + self.setup_test_environment(env) + + def setup_test_environment(self, env): + """When Fortran is not provided, a few tests need to be skipped""" + if (self.compiler.f77 is None): + env.set('F77', 'no') + if (self.compiler.fc is None): + env.set('FC', 'no') + + @when('@2.4.6') + def check(self): + """installcheck of libtool-2.4.6 runs the full testsuite, skip 'make check'""" + pass |