diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-12-19 00:29:49 -0500 |
---|---|---|
committer | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-12-19 11:59:47 -0500 |
commit | ccbb20e8810986656c01cc417f7d23731b0febdb (patch) | |
tree | c26e9d433339052a29bdb0fd9781212076105be7 /test cases/frameworks | |
parent | f1d370247fc3a46a5232ea2356ea6d67e5950e0f (diff) | |
download | meson-ccbb20e8810986656c01cc417f7d23731b0febdb.zip meson-ccbb20e8810986656c01cc417f7d23731b0febdb.tar.gz meson-ccbb20e8810986656c01cc417f7d23731b0febdb.tar.bz2 |
ci: improve robustness
* netcf
* hdf5
* scalapack
* coarray
Diffstat (limited to 'test cases/frameworks')
-rw-r--r-- | test cases/frameworks/25 hdf5/meson.build | 4 | ||||
-rw-r--r-- | test cases/frameworks/26 netcdf/meson.build | 37 | ||||
-rw-r--r-- | test cases/frameworks/30 scalapack/meson.build | 3 |
3 files changed, 22 insertions, 22 deletions
diff --git a/test cases/frameworks/25 hdf5/meson.build b/test cases/frameworks/25 hdf5/meson.build index 20bc5cd..5485035 100644 --- a/test cases/frameworks/25 hdf5/meson.build +++ b/test cases/frameworks/25 hdf5/meson.build @@ -11,14 +11,14 @@ exec = executable('exec', 'main.c', dependencies : h5c) test('HDF5 C', exec, timeout: 30) # --- C++ tests -if add_languages('cpp') +if add_languages('cpp', required: false) h5cpp = dependency('hdf5', language : 'cpp', required : false, disabler: true) execpp = executable('execpp', 'main.cpp', dependencies : h5cpp) test('HDF5 C++', execpp, timeout: 30) endif # --- Fortran tests -if add_languages('fortran') +if add_languages('fortran', required: false) h5f = dependency('hdf5', language : 'fortran', required : false, disabler: true) exef = executable('exef', 'main.f90', dependencies : h5f) test('HDF5 Fortran', exef, timeout: 30) diff --git a/test cases/frameworks/26 netcdf/meson.build b/test cases/frameworks/26 netcdf/meson.build index 15a0d19..0adc5e9 100644 --- a/test cases/frameworks/26 netcdf/meson.build +++ b/test cases/frameworks/26 netcdf/meson.build @@ -1,31 +1,32 @@ -project('netcdf_test', 'c', 'cpp') - - -# --- C tests -nc_c = dependency('netcdf', language : 'c', required : false) +project('netcdf_test', 'c') + +cc = meson.get_compiler('c') +c_code = '''#include <netcdf.h> +int main(void) { return 0; }''' +# --- C +nc_c = dependency('netcdf', language : 'c', required : false, disabler: true) +if not cc.links(c_code, dependencies: nc_c, name: 'NetCDF C') + nc_c = disabler() +endif if not nc_c.found() error('MESON_SKIP_TEST: NetCDF C library not found, skipping NetCDF framework tests.') endif exec = executable('exec', 'main.c', dependencies : nc_c) +test('NetCDF C', exec, timeout: 15) -test('NetCDF C', exec) - -# --- C++ tests -nc_cpp = dependency('netcdf', language : 'cpp', required : false) -if nc_cpp.found() +# --- C++ +if add_languages('cpp', required: false) + nc_cpp = dependency('netcdf', language : 'cpp', required : false, disabler: true) execpp = executable('execpp', 'main.cpp', dependencies : nc_cpp) - test('NetCDF C++', execpp) + test('NetCDF C++', execpp, timeout: 15) endif -# --- Fortran tests +# --- Fortran if build_machine.system() != 'windows' and build_machine.system() != 'darwin' - add_languages('fortran') - - nc_f = dependency('netcdf', language : 'fortran', required : false) - if nc_f.found() + if add_languages('fortran', required: false) + nc_f = dependency('netcdf', language : 'fortran', required : false, disabler: true) exef = executable('exef', 'main.f90', dependencies : nc_f) - - test('NetCDF Fortran', exef) + test('NetCDF Fortran', exef, timeout: 15) endif endif diff --git a/test cases/frameworks/30 scalapack/meson.build b/test cases/frameworks/30 scalapack/meson.build index 430f54f..165cb30 100644 --- a/test cases/frameworks/30 scalapack/meson.build +++ b/test cases/frameworks/30 scalapack/meson.build @@ -5,7 +5,6 @@ if not mpi_c.found() error('MESON_SKIP_TEST: MPI library not available') endif - scalapack = dependency('scalapack', required: false) if not scalapack.found() error('MESON_SKIP_TEST: scalapack library not available') @@ -15,7 +14,7 @@ c_exe = executable('scalapack_c', 'main.c', dependencies: [scalapack, mpi_c]) test('scalapack_c', c_exe, timeout: 30) -if add_languages('fortran') +if add_languages('fortran', required: false) mpi_f = dependency('mpi', language: 'fortran', required: false) if not mpi_f.found() error('MESON_SKIP_TEST: MPI Fortran library not available') |