From c2a668efef2d7013dc8d3cef706f3d38eb990302 Mon Sep 17 00:00:00 2001 From: Guus Bertens Date: Mon, 9 Dec 2024 00:15:11 +0100 Subject: [PATCH 1/3] Update to Meson 0.64.1. Meson 0.64.0 introduces fs.copyfile(). We use the latest patch level of 0.64, which 0.64.1. --- externals/meson | 2 +- meson_scripts/init.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/externals/meson b/externals/meson index 41c650a040d..e000aa11373 160000 --- a/externals/meson +++ b/externals/meson @@ -1 +1 @@ -Subproject commit 41c650a040d50e0912d268af7a903a9ce1456dfa +Subproject commit e000aa11373298c6c07e264d4436b5075210bd11 diff --git a/meson_scripts/init.py b/meson_scripts/init.py index e3df3e023ba..164ea36645e 100755 --- a/meson_scripts/init.py +++ b/meson_scripts/init.py @@ -61,7 +61,7 @@ def init_submodules( github_repo_medi = "https://github.com/SciCompKL/MeDiPack" sha_version_opdi = "a6b9655c240af2a35454a61727e5bbbbaa3a425f" github_repo_opdi = "https://github.com/SciCompKL/OpDiLib" - sha_version_meson = "41c650a040d50e0912d268af7a903a9ce1456dfa" + sha_version_meson = "e000aa11373298c6c07e264d4436b5075210bd11" github_repo_meson = "https://github.com/mesonbuild/meson" sha_version_ninja = "52649de2c56b63f42bc59513d51286531c595b44" github_repo_ninja = "https://github.com/ninja-build/ninja" From 82abcade44ef04255daaa26eeb2bf52fbef1b3b1 Mon Sep 17 00:00:00 2001 From: Guus Bertens Date: Fri, 6 Dec 2024 17:02:03 +0100 Subject: [PATCH 2/3] UnitTests: make Meson copy required drg files to build dir --- UnitTests/Common/containers/CLookupTable_tests.cpp | 5 ++--- UnitTests/meson.build | 13 ++++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/UnitTests/Common/containers/CLookupTable_tests.cpp b/UnitTests/Common/containers/CLookupTable_tests.cpp index f90ceb08f99..0c0748c5a55 100644 --- a/UnitTests/Common/containers/CLookupTable_tests.cpp +++ b/UnitTests/Common/containers/CLookupTable_tests.cpp @@ -38,7 +38,7 @@ TEST_CASE("LUTreader", "[tabulated chemistry]") { /*--- smaller and trivial lookup table ---*/ - CLookUpTable look_up_table("src/SU2/UnitTests/Common/containers/lookuptable.drg", "ProgressVariable", "EnthalpyTot"); + CLookUpTable look_up_table("lookuptable.drg", "ProgressVariable", "EnthalpyTot"); /*--- string names of the controlling variables ---*/ @@ -87,8 +87,7 @@ TEST_CASE("LUTreader", "[tabulated chemistry]") { TEST_CASE("LUTreader_3D", "[tabulated chemistry]") { /*--- smaller and trivial lookup table ---*/ - CLookUpTable look_up_table("src/SU2/UnitTests/Common/containers/lookuptable_3D.drg", "ProgressVariable", - "EnthalpyTot"); + CLookUpTable look_up_table("lookuptable_3D.drg", "ProgressVariable", "EnthalpyTot"); /*--- string names of the controlling variables ---*/ diff --git a/UnitTests/meson.build b/UnitTests/meson.build index 1c806b67ca4..fe3d7706eca 100644 --- a/UnitTests/meson.build +++ b/UnitTests/meson.build @@ -1,3 +1,5 @@ +fs = import('fs') + # Add any new test files here # ------------------------------------------------------------------------- # Begin unit test listings @@ -29,6 +31,10 @@ su2_cfd_tests_dd = files(['Common/simple_directdiff_test.cpp']) if get_option('enable-tests') if get_option('enable-normal') + unit_test_deps = [ + fs.copyfile('Common/containers/lookuptable.drg', 'lookuptable.drg'), + fs.copyfile('Common/containers/lookuptable_3D.drg', 'lookuptable_3D.drg'), + ] unit_test_files = su2_cfd_tests + files(['test_driver.cpp']) test_driver = executable( 'test_driver', @@ -37,7 +43,12 @@ if get_option('enable-tests') dependencies : [su2_cfd_dep, common_dep, su2_deps, catch2_dep], cpp_args: ['-fPIC', default_warning_flags, su2_cpp_args] ) - test('Catch2 test driver', test_driver) + test( + 'Catch2 test driver', + test_driver, + depends: unit_test_deps, + workdir: meson.current_build_dir(), + ) endif if get_option('enable-autodiff') From 9e0549ee24f670ff40b0ed7dc1ee030747cb3bf2 Mon Sep 17 00:00:00 2001 From: Guus Bertens Date: Fri, 6 Dec 2024 17:02:26 +0100 Subject: [PATCH 3/3] UnitTests: do not install tests --- UnitTests/meson.build | 3 --- 1 file changed, 3 deletions(-) diff --git a/UnitTests/meson.build b/UnitTests/meson.build index fe3d7706eca..4ddf26ec169 100644 --- a/UnitTests/meson.build +++ b/UnitTests/meson.build @@ -39,7 +39,6 @@ if get_option('enable-tests') test_driver = executable( 'test_driver', unit_test_files, - install : true, dependencies : [su2_cfd_dep, common_dep, su2_deps, catch2_dep], cpp_args: ['-fPIC', default_warning_flags, su2_cpp_args] ) @@ -56,7 +55,6 @@ if get_option('enable-tests') test_driver_AD = executable( 'test_driver_AD', unit_test_files_ad, - install : true, dependencies : [su2_cfd_dep_ad, commonAD_dep, su2_deps, codi_dep, catch2_dep], cpp_args: ['-fPIC', default_warning_flags, su2_cpp_args, codi_rev_args] ) @@ -68,7 +66,6 @@ if get_option('enable-tests') test_driver_DD = executable( 'test_driver_DD', unit_test_files_dd, - install : true, dependencies : [su2_cfd_dep_dd, commonDD_dep, su2_deps, codi_dep, catch2_dep], cpp_args: ['-fPIC', default_warning_flags, su2_cpp_args, codi_for_args] )