Skip to content
Snippets Groups Projects
Verified Commit 35ee179c authored by René Fritze's avatar René Fritze
Browse files

[tests] fix unusable template combinations when istl/eigen missing

parent 46971bf3
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ def matrices(cache):
if codegen.have_eigen(cache):
mat.extend(['EigenRowMajorSparseMatrix', 'EigenDenseMatrix'])
if codegen.have_eigen(cache):
if codegen.have_istl(cache):
mat.append('IstlRowMajorSparseMatrix')
return mat
......
from matrices import latype
from dune.xt.codegen import typeid_to_typedef_name as safe_name
from dune.xt.codegen import have_eigen, have_istl, typeid_to_typedef_name as safe_name
types = [f.split('_') for f in ['CommonDenseMatrix_CommonDenseVector_CommonDenseVector_complex',
......@@ -21,4 +21,13 @@ def test_tuple(args):
f = 'std::complex<double>'
return (safe_name('{}_{}_{}_{}'.format(o, r, s, f)), latype(o,f), latype(r,f), latype(s,f))
testtypes = [test_tuple(item) for item in types]
\ No newline at end of file
def type_ok(t):
if sum(['Eigen' in x for x in t]):
return have_eigen(cache)
if sum(['Istl' in x for x in t]):
return have_istl(cache)
return True
testtypes = [test_tuple(item) for item in types if type_ok(item)]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment