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.
93 lines
3.1 KiB
Meson
93 lines
3.1 KiB
Meson
sandboxes = [
|
|
'rayfem_sandbox',
|
|
'discritization_sandbox',
|
|
'eos_sandbox',
|
|
'finite_sandbox',
|
|
'dimensions_sandbox',
|
|
'quadrature_sandbox',
|
|
'meta_sandbox',
|
|
'mapping_sandbox',
|
|
'equations_sandbox',
|
|
'geometry_sandbox',
|
|
'surface_sandbox',
|
|
'deformation_sandbox',
|
|
'solver_sandbox',
|
|
'complete_sandbox',
|
|
'normalization_sandbox',
|
|
'preconditioner_sandbox',
|
|
'model_sandbox',
|
|
'lane-emden_sandbox',
|
|
]
|
|
|
|
expected_errors = {}
|
|
foreach entry : get_option('sandbox_expected_errors')
|
|
parts = entry.split(':')
|
|
if parts.length() != 2 or parts[0] not in sandboxes or parts[1] == ''
|
|
error('Invalid sandbox_expected_errors entry: ' + entry)
|
|
endif
|
|
expected_errors += {parts[0]: parts[1]}
|
|
endforeach
|
|
|
|
foreach sandbox: sandboxes
|
|
sandbox_timeout = sandbox in ['solver_sandbox', 'complete_sandbox'] ? 3600 : 30
|
|
sandbox_cpp_args = []
|
|
sandbox_link_depends = []
|
|
sandbox_dependencies = [serif_dep, nameof_dep]
|
|
sandbox_includes = []
|
|
if sandbox == 'complete_sandbox'
|
|
viewer_path = ''
|
|
if rayfem_project.get_variable('build_viewer')
|
|
viewer_target = rayfem_project.get_variable('rayfem_viewer')
|
|
viewer_path = viewer_target.full_path()
|
|
sandbox_link_depends += [viewer_target]
|
|
endif
|
|
sandbox_cpp_args += ['-DSERIF_RAYFEM_EXECUTABLE="' + viewer_path + '"']
|
|
# Streamed frames report the vacuum virial measured by the solver tests.
|
|
sandbox_dependencies += [stroid_dep]
|
|
sandbox_includes += [include_directories('../include')]
|
|
endif
|
|
sandbox_exe = executable(
|
|
sandbox,
|
|
sandbox + '.cpp',
|
|
dependencies: sandbox_dependencies,
|
|
include_directories: sandbox_includes,
|
|
cpp_args: sandbox_cpp_args,
|
|
link_depends: sandbox_link_depends,
|
|
build_rpath: mfem_runtime_prefix == '' ? '' : mfem_runtime_prefix / 'lib',
|
|
)
|
|
if sandbox in ['solver_sandbox', 'complete_sandbox'] and not mfem_has_mpi
|
|
# These examples select the default AMG inverse, which requires MPI/Hypre.
|
|
continue
|
|
endif
|
|
if expected_errors.has_key(sandbox)
|
|
test(
|
|
sandbox, python_build,
|
|
args: [files('../../tools/check_sandbox_error.py'), sandbox_exe, expected_errors[sandbox]],
|
|
workdir: meson.project_source_root(),
|
|
suite: 'sandbox',
|
|
)
|
|
else
|
|
test(sandbox, sandbox_exe, workdir: meson.project_source_root(), suite: 'sandbox', timeout: sandbox_timeout)
|
|
endif
|
|
endforeach
|
|
|
|
# This example uses only the dependency headers, independently of MFEM and SERiF linking.
|
|
dependencies_sandbox = executable(
|
|
'dependencies_sandbox',
|
|
'dependencies_sandbox.cpp',
|
|
dependencies: [magic_enum_dep],
|
|
include_directories: include_dir,
|
|
)
|
|
test('dependencies_sandbox', dependencies_sandbox, suite: 'sandbox')
|
|
|
|
# Demonstrate archive ownership and continuation without leaving a file in the source tree.
|
|
serialization_sandbox = executable(
|
|
'serialization_sandbox',
|
|
'serialization_sandbox.cpp',
|
|
dependencies: [serif_dep],
|
|
build_rpath: mfem_runtime_prefix == '' ? '' : mfem_runtime_prefix / 'lib',
|
|
)
|
|
if mfem_has_mpi
|
|
test('serialization_sandbox', serialization_sandbox, suite: 'sandbox', timeout: 1800, is_parallel: false)
|
|
endif
|