From 629b15840a746dddb839e5c9e7b087abff6e8f4d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 22 Jul 2019 15:29:26 +0200 Subject: [PATCH] Add missing build file --- tests/meson.build | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tests/meson.build diff --git a/tests/meson.build b/tests/meson.build new file mode 100644 index 00000000..2c68f6be --- /dev/null +++ b/tests/meson.build @@ -0,0 +1,51 @@ +if get_option('tests') + +test_env = [ + 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), + 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), + 'G_DEBUG=gc-friendly,fatal-warnings', + 'GSETTINGS_BACKEND=memory', + 'MALLOC_CHECK_=2' +] + +test_cflags = [ + '-I@0@/../src'.format(meson.current_source_dir()), + '-I@0@/../src'.format(meson.current_build_dir()), + '-DFOR_TESTING', + '-DEEK_COMPILATION', + '-DEEKBOARD_COMPILATION' +] + +test_link_args = [ + '-fPIC', +] + +tests = [ + 'eek-simple-test', + 'eek-xml-test' +] + +foreach name : tests + + test_sources = [name + '.c'] + + t = executable( + name, + test_sources, + squeekboard_resources, + link_with: libsqueekboard, +# wl_proto_sources, + c_args : test_cflags, + link_args: test_link_args, + dependencies: deps, # from src/meson.build + include_directories: [ + include_directories('..'), + include_directories('../eek') + ] + ) + + test(name, t, env: test_env) + +endforeach + +endif