From: Karel Zak Date: Tue, 1 Jul 2025 15:52:40 +0000 (+0200) Subject: meson: cleanup tests to use libcommon.la X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1198663313c046d4a1f7e6dfc18a59da7e3e8feb;p=thirdparty%2Futil-linux.git meson: cleanup tests to use libcommon.la This change simplifies future test work. Signed-off-by: Karel Zak --- diff --git a/meson.build b/meson.build index e3038240a..38adc8d07 100644 --- a/meson.build +++ b/meson.build @@ -3487,6 +3487,7 @@ exe = executable( 'lib/strutils.c', c_args : ['-DTEST_PROGRAM_STRUTILS'], include_directories : dir_include, + link_with : lib_common, build_by_default: program_tests) if not is_disabler(exe) exes += exe @@ -3530,8 +3531,6 @@ if conf.get('HAVE_OPENAT').to_string() == '1' \ exe = executable( 'test_path', 'lib/path.c', - 'lib/fileutils.c', - have_cpu_set_t ? 'lib/cpuset.c' : [], c_args : ['-DTEST_PROGRAM_PATH'], include_directories : dir_include, link_with : lib_common, @@ -3564,6 +3563,7 @@ if LINUX 'lib/cpuset.c', c_args : ['-DTEST_PROGRAM_CPUSET'], include_directories : dir_include, + link_with : lib_common, build_by_default: program_tests) if not is_disabler(exe) exes += exe @@ -3573,13 +3573,9 @@ endif exe = executable( 'test_sysfs', 'lib/sysfs.c', - 'lib/path.c', - 'lib/buffer.c', - 'lib/mbsalign.c', - 'lib/fileutils.c', - have_cpu_set_t ? 'lib/cpuset.c' : [], c_args : ['-DTEST_PROGRAM_SYSFS'], include_directories : dir_include, + link_with : lib_common, build_by_default: program_tests) if not is_disabler(exe) exes += exe @@ -3610,6 +3606,7 @@ exe = executable( 'lib/fileutils.c', c_args : ['-DTEST_PROGRAM_FILEUTILS'], include_directories : dir_include, + link_with : lib_common, build_by_default: program_tests) if not is_disabler(exe) exes += exe @@ -3620,6 +3617,7 @@ exe = executable( 'lib/canonicalize.c', c_args : ['-DTEST_PROGRAM_CANONICALIZE'], include_directories : dir_include, + link_with : lib_common, build_by_default: program_tests) if not is_disabler(exe) exes += exe @@ -3628,9 +3626,9 @@ endif exe = executable( 'test_timeutils', 'lib/timeutils.c', - 'lib/strutils.c', c_args : ['-DTEST_PROGRAM_TIMEUTILS'], include_directories : dir_include, + link_with : lib_common, build_by_default: program_tests) if not is_disabler(exe) exes += exe