summaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build47
1 files changed, 41 insertions, 6 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 910f17c..c6570d9 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -30,16 +30,20 @@ if add_languages('cpp', native: false, required: false)
'yasl-cpp-api-test',
'test_api.cpp',
dependencies: shared_dep,
- cpp_args: cpp.get_supported_arguments('-pedantic-errors'),
+ cpp_args: cpp.get_supported_arguments('-pedantic-errors') + [
+ '-DYASL_HAS_WAYLAND=' + (has_wayland ? '1' : '0'),
+ '-DYASL_HAS_X11=' + (has_x11 ? '1' : '0'),
+ '-DYASL_HAS_COCOA=' + (has_cocoa ? '1' : '0'),
+ ],
override_options: ['cpp_std=c++11'],
)
test('cpp-api', cpp_api_test)
endif
-python = find_program('python3')
-if system == 'linux'
- nm = find_program('nm')
- export_args = []
+python = find_program('python3', native: true)
+if system == 'linux' or system == 'darwin'
+ nm = find_program('nm', native: false)
+ export_args = ['--platform=' + system]
if get_option('b_sanitize').contains('address')
# Clang's ASan instrumentation exports these linker-generated markers.
export_args += ['--allow-export=__start_asan_globals',
@@ -57,6 +61,9 @@ if system == 'linux'
if has_x11
exported_headers += files('../include/yasl/native/x11.h')
endif
+ if has_cocoa
+ exported_headers += files('../include/yasl/native/cocoa.h')
+ endif
test('public-exports', python,
args: [files('helpers/check_exports.py')] + export_args +
[nm, yasl_lib.get_shared_lib(), exported_headers],
@@ -71,6 +78,16 @@ contracts_test = executable(
)
test('contracts', contracts_test)
+keyboard_test = executable('yasl-keyboard-test', 'common/test_keyboard.c',
+ include_directories: inc, dependencies: yasl_dep,
+)
+test('keyboard', keyboard_test)
+
+utf8_test = executable('yasl-utf8-test', 'common/test_utf8.c',
+ include_directories: inc, dependencies: yasl_dep,
+)
+test('utf8', utf8_test)
+
timer_test = executable(
'yasl-timer-test',
'common/test_timers.c',
@@ -118,6 +135,14 @@ elif get_option('x11_tablet_tests')
endif
if has_wayland
+ clipboard_wayland_test = executable('yasl-clipboard-wayland-test', 'wayland/test_clipboard.c',
+ include_directories: inc, dependencies: yasl_dep,
+ )
+ test('clipboard-wayland', clipboard_wayland_test)
+ keyboard_wayland_test = executable('yasl-keyboard-wayland-test', 'wayland/test_keyboard.c',
+ include_directories: inc, dependencies: yasl_dep,
+ )
+ test('keyboard-wayland', keyboard_wayland_test)
ime_test = executable('yasl-ime-test', 'wayland/test_input.c',
include_directories: inc,
dependencies: yasl_dep,
@@ -143,6 +168,9 @@ benchmark('performance', benchmark_exe)
if get_option('integration_tests')
if has_cocoa
+ test('hello-cocoa-window', hello_example,
+ args: ['--smoke-test'], timeout: 20,
+ )
native_test = executable('yasl-native-test', 'cocoa/test_native.c',
dependencies: shared_dep,
)
@@ -151,6 +179,10 @@ if get_option('integration_tests')
dependencies: [shared_dep, deps],
)
test('native-ownership', ownership_test, timeout: 20)
+ keyboard_cocoa_test = executable('yasl-keyboard-cocoa-test', 'cocoa/test_keyboard.m',
+ dependencies: [shared_dep, deps],
+ )
+ test('keyboard-cocoa', keyboard_cocoa_test, timeout: 20)
tablet_cocoa_test = executable('yasl-tablet-cocoa-test', 'cocoa/test_tablet.m',
dependencies: [shared_dep, deps],
)
@@ -171,11 +203,14 @@ if get_option('integration_tests')
'common/test_backends.c',
dependencies: [shared_dep, deps],
)
+ input_x11_test = executable('yasl-input-x11-test', 'x11/test_input.c',
+ include_directories: inc, dependencies: yasl_dep,
+ )
weston = find_program('weston')
xwayland = find_program('Xwayland')
test('backends', python,
args: [files('helpers/run_backends.py'), weston, xwayland,
- backend_test, timer_test, tablet_example],
+ backend_test, timer_test, tablet_example, hello_example, input_x11_test],
timeout: 60,
)
endif