Marc-André Lureau | 279588d | 2020-08-03 09:05:54 +0200 | [diff] [blame] | 1 | py3 = import('python').find_installation() |
| 2 | |
Thomas Huth | 3b472e7 | 2021-03-12 10:22:38 +0100 | [diff] [blame] | 3 | subdir('bench') |
Marc-André Lureau | a52f4a7 | 2020-08-28 15:07:28 +0400 | [diff] [blame] | 4 | |
Marc-André Lureau | 37e2777 | 2020-08-28 15:07:19 +0400 | [diff] [blame] | 5 | test_qapi_outputs = [ |
| 6 | 'qapi-builtin-types.c', |
| 7 | 'qapi-builtin-types.h', |
| 8 | 'qapi-builtin-visit.c', |
| 9 | 'qapi-builtin-visit.h', |
| 10 | 'test-qapi-commands-sub-sub-module.c', |
| 11 | 'test-qapi-commands-sub-sub-module.h', |
| 12 | 'test-qapi-commands.c', |
| 13 | 'test-qapi-commands.h', |
| 14 | 'test-qapi-emit-events.c', |
| 15 | 'test-qapi-emit-events.h', |
| 16 | 'test-qapi-events-sub-sub-module.c', |
| 17 | 'test-qapi-events-sub-sub-module.h', |
| 18 | 'test-qapi-events.c', |
| 19 | 'test-qapi-events.h', |
| 20 | 'test-qapi-init-commands.c', |
| 21 | 'test-qapi-init-commands.h', |
| 22 | 'test-qapi-introspect.c', |
| 23 | 'test-qapi-introspect.h', |
| 24 | 'test-qapi-types-sub-sub-module.c', |
| 25 | 'test-qapi-types-sub-sub-module.h', |
| 26 | 'test-qapi-types.c', |
| 27 | 'test-qapi-types.h', |
| 28 | 'test-qapi-visit-sub-sub-module.c', |
| 29 | 'test-qapi-visit-sub-sub-module.h', |
| 30 | 'test-qapi-visit.c', |
| 31 | 'test-qapi-visit.h', |
| 32 | ] |
| 33 | |
| 34 | test_qapi_files = custom_target('Test QAPI files', |
| 35 | output: test_qapi_outputs, |
| 36 | input: files('qapi-schema/qapi-schema-test.json', |
| 37 | 'qapi-schema/include/sub-module.json', |
| 38 | 'qapi-schema/sub-sub-module.json'), |
| 39 | command: [ qapi_gen, '-o', meson.current_build_dir(), |
| 40 | '-b', '-p', 'test-', '@INPUT0@' ], |
| 41 | depend_files: qapi_gen_depends) |
| 42 | |
| 43 | # meson doesn't like generated output in other directories |
| 44 | # perhaps change qapi_gen to replace / with _, like Meson itself does? |
| 45 | subdir('include') |
| 46 | |
Paolo Bonzini | 97d6efd | 2020-10-14 07:20:17 -0400 | [diff] [blame] | 47 | test_qapi_sources = [] |
| 48 | test_qapi_headers = [] |
| 49 | i = 0 |
| 50 | foreach o: test_qapi_files.to_list() + test_qapi_files_extra.to_list() |
| 51 | if o.full_path().endswith('.h') |
| 52 | test_qapi_headers += o |
| 53 | endif |
| 54 | test_qapi_sources += o |
| 55 | endforeach |
| 56 | |
| 57 | libtestqapi = static_library('testqapi', sources: [genh, test_qapi_sources]) |
| 58 | testqapi = declare_dependency(link_with: libtestqapi, sources: [genh, test_qapi_headers]) |
Marc-André Lureau | 37e2777 | 2020-08-28 15:07:19 +0400 | [diff] [blame] | 59 | |
Marc-André Lureau | 279588d | 2020-08-03 09:05:54 +0200 | [diff] [blame] | 60 | test_deps = { |
| 61 | 'test-qht-par': qht_bench, |
| 62 | } |
| 63 | |
Paolo Bonzini | 27d551c | 2020-09-11 13:12:11 +0200 | [diff] [blame] | 64 | if have_tools and 'CONFIG_VHOST_USER' in config_host and 'CONFIG_LINUX' in config_host |
Marc-André Lureau | 89d4dc8 | 2020-08-28 15:07:27 +0400 | [diff] [blame] | 65 | executable('vhost-user-bridge', |
| 66 | sources: files('vhost-user-bridge.c'), |
Marc-André Lureau | 0df750e | 2020-11-25 14:06:37 +0400 | [diff] [blame] | 67 | dependencies: [qemuutil, vhost_user]) |
Marc-André Lureau | 89d4dc8 | 2020-08-28 15:07:27 +0400 | [diff] [blame] | 68 | endif |
| 69 | |
Paolo Bonzini | ce1c1e7 | 2020-01-28 16:41:44 +0100 | [diff] [blame] | 70 | test('decodetree', sh, |
| 71 | args: [ files('decode/check.sh'), config_host['PYTHON'], files('../scripts/decodetree.py') ], |
| 72 | workdir: meson.current_source_dir() / 'decode', |
| 73 | suite: 'decodetree') |
Paolo Bonzini | 3941996 | 2020-08-06 14:08:31 +0200 | [diff] [blame] | 74 | |
Philippe Mathieu-Daudé | f77147c | 2021-01-22 21:44:31 +0100 | [diff] [blame] | 75 | if 'CONFIG_TCG' in config_all |
| 76 | subdir('fp') |
| 77 | endif |
Alex Bennée | 7f80868 | 2020-09-09 12:27:34 +0100 | [diff] [blame] | 78 | |
Paolo Bonzini | 1badb70 | 2020-09-18 04:57:25 -0400 | [diff] [blame] | 79 | if not get_option('tcg').disabled() |
Paolo Bonzini | ffac93d | 2020-02-04 16:09:05 +0100 | [diff] [blame] | 80 | if 'CONFIG_PLUGIN' in config_host |
| 81 | subdir('plugin') |
| 82 | endif |
Paolo Bonzini | 3941996 | 2020-08-06 14:08:31 +0200 | [diff] [blame] | 83 | endif |
Paolo Bonzini | 3afe7ab | 2020-01-28 18:05:14 +0100 | [diff] [blame] | 84 | |
Thomas Huth | da668aa | 2021-03-10 07:33:14 +0100 | [diff] [blame] | 85 | subdir('unit') |
Paolo Bonzini | 3afe7ab | 2020-01-28 18:05:14 +0100 | [diff] [blame] | 86 | subdir('qapi-schema') |
Paolo Bonzini | a2ce7db | 2020-08-04 20:00:40 +0200 | [diff] [blame] | 87 | subdir('qtest') |
Marc-André Lureau | 4fbcdcd | 2020-08-28 15:07:34 +0400 | [diff] [blame] | 88 | subdir('migration') |