2021-09-20 00:09:03 +02:00
|
|
|
check = dependency('check', required: get_option('tests'), version: '>=0.11')
|
2023-09-11 19:57:32 +02:00
|
|
|
if check.found()
|
2018-02-10 13:13:06 +01:00
|
|
|
test_dependencies = [
|
|
|
|
declare_dependency(link_with: libzathura),
|
|
|
|
check
|
|
|
|
]
|
|
|
|
|
|
|
|
include_directories += [ include_directories('../zathura') ]
|
|
|
|
|
2018-05-21 11:38:55 +02:00
|
|
|
document = executable('test_document', ['test_document.c', 'tests.c'],
|
2018-02-10 13:13:06 +01:00
|
|
|
dependencies: build_dependencies + test_dependencies,
|
|
|
|
include_directories: include_directories,
|
|
|
|
c_args: defines + flags
|
|
|
|
)
|
2023-09-11 19:57:32 +02:00
|
|
|
test('document', document,
|
2018-05-21 11:38:55 +02:00
|
|
|
timeout: 60*60
|
|
|
|
)
|
2018-02-10 13:13:06 +01:00
|
|
|
|
2023-09-11 19:57:32 +02:00
|
|
|
types = executable('test_types', ['test_types.c', 'tests.c'],
|
|
|
|
dependencies: build_dependencies + test_dependencies,
|
|
|
|
include_directories: include_directories,
|
|
|
|
c_args: defines + flags
|
|
|
|
)
|
|
|
|
test('types', types,
|
|
|
|
timeout: 60*60
|
|
|
|
)
|
|
|
|
|
|
|
|
utils = executable('test_utils', ['test_utils.c', 'tests.c'],
|
2018-05-21 11:38:55 +02:00
|
|
|
dependencies: build_dependencies + test_dependencies,
|
|
|
|
include_directories: include_directories,
|
|
|
|
c_args: defines + flags
|
|
|
|
)
|
2023-09-11 19:57:32 +02:00
|
|
|
test('utils', utils,
|
2018-05-21 11:38:55 +02:00
|
|
|
timeout: 60*60
|
|
|
|
)
|
2020-07-27 18:44:52 +02:00
|
|
|
|
2023-09-11 19:57:32 +02:00
|
|
|
xvfb = find_program('xvfb-run', required: get_option('tests'))
|
|
|
|
if xvfb.found()
|
|
|
|
session = executable('test_session', ['test_session.c', 'tests.c'],
|
|
|
|
dependencies: build_dependencies + test_dependencies,
|
|
|
|
include_directories: include_directories,
|
|
|
|
c_args: defines + flags
|
|
|
|
)
|
|
|
|
test('session', xvfb,
|
|
|
|
args: ['-a', '-s', '-screen 0 1400x900x24 -ac +extension GLX +render -noreset', session],
|
|
|
|
timeout: 60*60
|
2023-12-08 19:02:05 +01:00
|
|
|
)
|
2023-09-11 19:57:32 +02:00
|
|
|
|
|
|
|
if seccomp.found()
|
2023-12-08 19:02:05 +01:00
|
|
|
sandbox = executable('test_sandbox', ['test_sandbox.c', 'tests.c'],
|
|
|
|
dependencies: build_dependencies + test_dependencies,
|
|
|
|
include_directories: include_directories,
|
|
|
|
c_args: defines + flags
|
|
|
|
)
|
|
|
|
test('sandbox', xvfb,
|
|
|
|
args: ['-a', '-s', '-screen 0 1400x900x24 -ac +extension GLX +render -noreset', sandbox],
|
|
|
|
timeout: 60*60
|
|
|
|
)
|
|
|
|
endif
|
2023-09-11 19:57:32 +02:00
|
|
|
endif
|
2018-02-10 13:13:06 +01:00
|
|
|
endif
|