From ea7fefb8fbe02f67ef8db6581b167fa6e3117a16 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Wed, 18 Oct 2017 23:16:50 +0100 Subject: [PATCH] Run edi tests in meson --- meson.build | 1 + src/meson.build | 2 +- src/tests/edi_suite.c | 2 ++ src/tests/meson.build | 26 ++++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/tests/meson.build diff --git a/meson.build b/meson.build index f2ef9fd..6b900b8 100644 --- a/meson.build +++ b/meson.build @@ -14,6 +14,7 @@ config_h.set_quoted('PACKAGE_TARNAME' , meson.project_name()) config_h.set_quoted('PACKAGE_BUGREPORT', 'enlightenment-devel@lists.sourceforge.net') config_h.set_quoted('PACKAGE_STRING' , meson.project_name() + ' ' + meson.project_version()) config_h.set_quoted('PACKAGE_NAME' , meson.project_name()) +config_h.set_quoted('PACKAGE_BUILD_DIR', meson.build_root()) config_h.set_quoted('PACKAGE_BIN_DIR', join_paths(get_option('prefix'), get_option('bindir'))) config_h.set_quoted('PACKAGE_LIB_DIR', join_paths(get_option('prefix'), get_option('libdir'))) config_h.set_quoted('PACKAGE_DATA_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'edi')) diff --git a/src/meson.build b/src/meson.build index 67068a2..4a687de 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,3 +1,3 @@ subdir('lib') subdir('bin') -#subdir('tests') +subdir('tests') diff --git a/src/tests/edi_suite.c b/src/tests/edi_suite.c index b0f1087..a33dc57 100644 --- a/src/tests/edi_suite.c +++ b/src/tests/edi_suite.c @@ -9,6 +9,8 @@ #define COPYRIGHT "Copyright © 2014-2017 Andy Williams and various contributors (see AUTHORS)." +int _edi_log_dom = -1; + static const struct { const char *name; void (*build)(TCase *tc); diff --git a/src/tests/meson.build b/src/tests/meson.build new file mode 100644 index 0000000..0c08504 --- /dev/null +++ b/src/tests/meson.build @@ -0,0 +1,26 @@ +src = files([ + 'edi_suite.h', + 'edi_suite.c', + 'edi_test_content_provider.c', + 'edi_test_create.c', + 'edi_test_exe.c', + 'edi_test_language_provider.c', + 'edi_test_language_provider_c.c', + 'edi_test_path.c', +]) + +check = dependency('check') + +deps = [elm, check, edi_lib] + +if get_option('libclang') == true and has_clang_header == true + deps += [clang] +endif + +exe = executable('edi_suite', src, + dependencies : deps, + include_directories : [include_directories('../../../src/bin'), include_directories('../../../src/lib'), top_inc], + install : false +) +test('Edi Test Suite', exe) +