From 7407a261b716df35e2c4c4359847a353b57eb5ca Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Sat, 3 Jul 2021 18:54:04 +0200 Subject: [PATCH] meson: Run tests for libegg --- egg/meson.build | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/egg/meson.build b/egg/meson.build index 1b8a626..ac7c024 100644 --- a/egg/meson.build +++ b/egg/meson.build @@ -23,3 +23,30 @@ libegg = static_library('egg', dependencies: libegg_deps, include_directories: [config_h_dir, build_dir], ) + +# Tests +test_names = [ + 'test-hex', + 'test-secmem', +] + +if get_option('gcrypt') + test_names += [ + 'test-dh', + 'test-hkdf', + ] +endif + +foreach _test : test_names + + test_bin = executable(_test, + '@0@.c'.format(_test), + dependencies: libegg_deps, + link_with: libegg, + include_directories: config_h_dir, + ) + + test(_test, test_bin, + suite: 'libegg', + ) +endforeach