Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paths for Boost Python check #332

Merged
merged 4 commits into from
Jun 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 6 additions & 20 deletions cscs-checks/libraries/boost/boost_python_check.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
import os

import reframe as rfm
import reframe.utility.sanity as sn
from reframe.core.pipeline import RegressionTest


class BoostCrayGnuPythonTest(RegressionTest):

def __init__(self, boost_version, cray_gnu_version, python_version,
**kwargs):

def normalize(s):
return s.replace('.', '_')

super().__init__('boost_%s_cray_gnu_%s_python_%s_check' % (
normalize(boost_version), normalize(cray_gnu_version),
normalize(python_version)), os.path.dirname(__file__), **kwargs)
@rfm.parameterized_test(['1.65.0', '17.08', '2.7'], ['1.65.0', '17.08', '3.6'])
class BoostCrayGnuPythonTest(rfm.RegressionTest):
def __init__(self, boost_version, cray_gnu_version, python_version):
super().__init__()
self.descr = ('Test for Boost-%s for CrayGnu-%s with python %s '
'support') % (boost_version, cray_gnu_version,
python_version)
Expand All @@ -28,14 +19,9 @@ def normalize(s):
python_include_suffix = 'm' if python_major_version == '3' else ''
python_lib_suffix = '3' if python_major_version == '3' else ''
self.variables = {
'PYTHON_INCLUDE': (r'${PYTHON_PATH}/include/python%s%s') % (
'PYTHON_INCLUDE': r'include/python%s%s' % (
python_version, python_include_suffix),
'PYTHON_BOOST_LIB': 'boost_python' + python_lib_suffix
}
self.maintainers = ['JB', 'AJ']
self.tags = {'scs', 'production'}


def _get_checks(**kwargs):
return [BoostCrayGnuPythonTest('1.65.0', '17.08', '2.7', **kwargs),
BoostCrayGnuPythonTest('1.65.0', '17.08', '3.5', **kwargs)]
3 changes: 2 additions & 1 deletion cscs-checks/libraries/boost/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
TARGET = hello_boost_python
PYTHONDIR=$(shell echo $(PYTHONPATH) | cut -d ':' -f 1)

$(TARGET).so: $(TARGET).o
$(CXX) -shared -Wl,--export-dynamic $^ -l$(PYTHON_BOOST_LIB) -o $@

$(TARGET).o: $(TARGET).cpp
$(CXX) -fPIC -c -I$(PYTHON_INCLUDE) $^ -o $@
$(CXX) -fPIC -c -I"$(PYTHONDIR)/$(PYTHON_INCLUDE)" $^ -o $@