1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# Attention, emacs, please use -*- mode: python -*-
# (even though this isn't actually Python code)
# Compile helper programs
td = []
foreach prog: [ 'test_write_cache', 'test_setattr' ]
td += executable(prog, prog + '.c',
include_directories: include_dirs,
link_with: [ libfuse ],
dependencies: thread_dep,
install: false)
endforeach
td += executable('test_syscalls', 'test_syscalls.c',
include_directories: include_dirs,
install: false)
test_scripts = [ 'conftest.py', 'pytest.ini', 'test_examples.py',
'util.py' ]
td += custom_target('test_scripts', input: test_scripts,
output: test_scripts, build_by_default: true,
command: ['cp', '-fPu', '--preserve=mode',
'@INPUT@', meson.current_build_dir() ])
# Create a new 'tests' target that we can run with Ninja
run_target('tests', depends: td,
command: [ 'python3', '-m', 'pytest',
meson.current_build_dir() ])
# Provide something helpful when running 'ninja test'
wrong_cmd = executable('wrong_command', 'wrong_command.c',
install: false)
test('wrong_cmd', wrong_cmd)
|