Skip to content

Commit 446cc6e

Browse files
author
Guus Bertens
committed
UnitTests: make Meson copy required cfg/drg files
1 parent cde8892 commit 446cc6e

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

UnitTests/Common/containers/CLookupTable_tests.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
TEST_CASE("LUTreader", "[tabulated chemistry]") {
3939
/*--- smaller and trivial lookup table ---*/
4040

41-
CLookUpTable look_up_table("src/SU2/UnitTests/Common/containers/lookuptable.drg", "ProgressVariable", "EnthalpyTot");
41+
CLookUpTable look_up_table("lookuptable.drg", "ProgressVariable", "EnthalpyTot");
4242

4343
/*--- string names of the controlling variables ---*/
4444

@@ -87,8 +87,7 @@ TEST_CASE("LUTreader", "[tabulated chemistry]") {
8787
TEST_CASE("LUTreader_3D", "[tabulated chemistry]") {
8888
/*--- smaller and trivial lookup table ---*/
8989

90-
CLookUpTable look_up_table("src/SU2/UnitTests/Common/containers/lookuptable_3D.drg", "ProgressVariable",
91-
"EnthalpyTot");
90+
CLookUpTable look_up_table("lookuptable_3D.drg", "ProgressVariable", "EnthalpyTot");
9291

9392
/*--- string names of the controlling variables ---*/
9493

UnitTests/meson.build

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
fs = import('fs')
2+
13
# Add any new test files here
24
# -------------------------------------------------------------------------
35
# Begin unit test listings
@@ -29,6 +31,11 @@ su2_cfd_tests_dd = files(['Common/simple_directdiff_test.cpp'])
2931

3032
if get_option('enable-tests')
3133
if get_option('enable-normal')
34+
unit_test_deps = [
35+
fs.copyfile('SU2_CFD/fluid/multicomponent_cantera.cfg', 'multicomponent_cantera.cfg'),
36+
fs.copyfile('Common/containers/lookuptable.drg', 'lookuptable.drg'),
37+
fs.copyfile('Common/containers/lookuptable_3D.drg', 'lookuptable_3D.drg'),
38+
]
3239
unit_test_files = su2_cfd_tests + files(['test_driver.cpp'])
3340
test_driver = executable(
3441
'test_driver',
@@ -37,7 +44,12 @@ if get_option('enable-tests')
3744
dependencies : [su2_cfd_dep, common_dep, su2_deps, catch2_dep],
3845
cpp_args: ['-fPIC', default_warning_flags, su2_cpp_args]
3946
)
40-
test('Catch2 test driver', test_driver)
47+
test(
48+
'Catch2 test driver',
49+
test_driver,
50+
depends: unit_test_deps,
51+
workdir: meson.current_build_dir(),
52+
)
4153
endif
4254

4355
if get_option('enable-autodiff')

0 commit comments

Comments
 (0)