test(tests): added test suite
The test suite is extensive. Note that LLMs were used to aid in the development of the test suite. All LLM generated code was manually reviewed.
This commit is contained in:
@@ -1,22 +1,39 @@
|
||||
if get_option('build_tests')
|
||||
# subdir('discritization')
|
||||
#
|
||||
# test_include_dir = include_directories('include')
|
||||
#
|
||||
# catch2_dep = dependency('Catch2', required:true)
|
||||
# Stroid exchanges MFEM and standard-library objects with the sandboxes.
|
||||
# Always build it against the parent's MFEM and C++ ABI, never an unrelated
|
||||
# installed archive (even when pkg-config reports one).
|
||||
stroid_project = subproject('stroid', default_options: [
|
||||
'build_tests=false',
|
||||
'build_tools=false',
|
||||
'build_python=false',
|
||||
'pkg_config=false',
|
||||
])
|
||||
stroid_dep = stroid_project.get_variable('stroid_dep')
|
||||
#
|
||||
# test_sources = discretization_test_sources
|
||||
# executable('serif_tests', test_sources, dependencies: [serif_dep, catch2_dep, stroid_dep], include_directories: test_include_dir)
|
||||
test('mfem_build_policy', python_build,
|
||||
args: files('../tools/test_mfem_build_policy.py'), suite: 'build', timeout: 60)
|
||||
catch2_dep = dependency('catch2-with-main', version: '>=3.0', fallback: ['catch2', 'catch2_with_main_dep'], default_options: ['tests=false', 'install=false'])
|
||||
|
||||
subdir('sandbox')
|
||||
subdir('discritization')
|
||||
subdir('mapping')
|
||||
subdir('eos')
|
||||
subdir('quadrature')
|
||||
subdir('equations')
|
||||
subdir('surface')
|
||||
subdir('deformation')
|
||||
subdir('utils')
|
||||
subdir('normalization')
|
||||
subdir('preconditioner')
|
||||
subdir('model')
|
||||
subdir('solver')
|
||||
subdir('serialize')
|
||||
|
||||
test_include_dir = include_directories('include')
|
||||
test_sources = discretization_test_sources + mapping_test_sources + eos_test_sources + quadrature_test_sources + equation_test_sources + surface_test_sources + deformation_test_sources + normalization_test_sources
|
||||
serif_tests = executable(
|
||||
'serif_tests',
|
||||
test_sources,
|
||||
dependencies: [serif_dep, catch2_dep, stroid_dep],
|
||||
include_directories: test_include_dir,
|
||||
build_rpath: mfem_runtime_prefix == '' ? '' : mfem_runtime_prefix / 'lib',
|
||||
)
|
||||
test('serif_unit_tests', serif_tests, args: ['[unit]~[vector_gradient]'], suite: 'unit', timeout: 120)
|
||||
# These exhaustive dense/tensor comparisons have their own budget without reducing the ordinary unit checks.
|
||||
test('serif_vector_gradient_tests', serif_tests, args: ['[unit][vector_gradient]'], suite: 'unit', timeout: 300, is_parallel: false)
|
||||
test('serif_integration_tests', serif_tests, args: ['[integration]~[nonconforming]~[serial_backend]'], suite: 'integration', timeout: 300)
|
||||
test('serif_serial_backend_tests', serif_tests, args: ['[integration][serial_backend]~[nonconforming]'], suite: 'integration', timeout: 600)
|
||||
|
||||
# Keep native nonconforming studies together without shortening the existing tests' budgets.
|
||||
test('serif_nonconforming_tests', serif_tests, args: ['[integration][nonconforming]'], suite: 'integration', timeout: 1200, is_parallel: false)
|
||||
|
||||
subdir('sandbox')
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user