Skip to content
Snippets Groups Projects
Commit 075d4881 authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

add apbs tests

parent 18ddda11
No related branches found
No related tags found
No related merge requests found
......@@ -30,17 +30,43 @@ class Apbs(CMakePackage):
version('3.4.0', sha256='572ff606974119430020ec948c78e171d8525fb0e67a56dad937a897cac67461')
# Dependencies.
depends_on('cmake@3.19', type='build')
depends_on('python@3.8:3.10', type=('build', 'run'))
depends_on('blas', type=('build', 'run'))
depends_on('suite-sparse', type=('build', 'run'))
depends_on('maloc', type=('build', 'run'))
depends_on('cmake@3.19', type=('build'))
depends_on('bison', type=('build'))
depends_on('flex', type=('build'))
depends_on('swig', type=('build'))
depends_on('readline', type=('build', 'run'))
depends_on('eigen', type=('build', 'run'))
depends_on('boost', type=('build', 'run'))
depends_on('blas', type=('build', 'run'))
depends_on('arpack-ng', type=('build', 'run'))
depends_on('suite-sparse+tbb', type=('build', 'run'))
depends_on('maloc', type=('build', 'run'))
depends_on('python@3.8:3.10', type=('build', 'run'))
def cmake_args(self):
# Min and max Python versions need to be set as variables to pass tests.
# See tests/CMakeLists.txt lines 6-14.
python_version = str(self.spec['python'].version)
args = [
'-DPYTHON_MIN_VERSION=3.8',
'-DPYTHON_MAX_VERSION=3.10',
'-DPYTHON_MIN_VERSION='+python_version,
'-DPYTHON_MAX_VERSION='+python_version
]
return args
def setup_build_environment(self, env):
# add suite-sparse libs to path because tests can't find them
env.prepend_path("LD_LIBRARY_PATH", self.spec['suite-sparse'].prefix.lib)
@run_after('install')
@on_package_attributes(run_tests=True)
def install_test(self):
with working_dir(self.build_directory):
# for testing, apbs needs to be in the path
import os
os.environ['PATH'] = self.prefix.bin + ':' + os.environ['PATH']
ctest = which("ctest")
ctest("-C", "Release", "--output-on-failure")
def check(self):
# this would run "make test" before installation, so we override this and define install_test() instead
pass
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment