rizin/test/unit/meson.build
Riccardo Schirone a7fd3fa3c6 Use mu_main to reduce boilerplate in unit tests
* Disable colors on Windows because terminal looks bad otherwise
* Use environment on Windows to set PATH and make sure unit tests use
  the compiled libraries and not the installed ones
* Define ssize_t on Windows as well by using SSIZE_T

Update test_analysis_block.c

Update test_intervaltree.c

Update test_unum.c
2021-01-03 11:42:38 +01:00

116 lines
2.1 KiB
Meson

if get_option('enable_tests')
subdir('auxiliary')
tests = [
'addr_interval',
'analysis_block',
'analysis_cc',
'analysis_function',
'analysis_hints',
'analysis_types',
'analysis_meta',
'analysis_var',
'analysis_xrefs',
'analysis_class_graph',
'annotated_code',
'autocmplt',
'base64',
'bin',
'binheap',
'bitmap',
'buf',
'ovf',
'cmd',
'core_cmd',
'core_task',
'rzpipe',
'cons',
'contrbtree',
'debruijn',
'debug_session',
'diff',
'dwarf',
'dwarf_info',
'dwarf_integration',
'esil_dfg_filter',
'event',
'file',
'flags',
'glob',
'graph',
'hex',
'intervaltree',
'io',
'json',
'list',
'parse_ctype',
'pdb',
'pj',
'queue',
'rz_test',
'rbtree',
'serialize_analysis',
'serialize_config',
'serialize_flag',
'serialize_spaces',
'sign',
'skiplist',
'spaces',
'sparse',
'stack',
'str',
'strbuf',
'table',
'task',
'tree',
'uleb128',
'unum',
'util',
'vector',
'skyline',
'big',
'idpool',
'idstorage',
'subprocess',
]
unit_test_env = environment()
if test_env_common_path != []
unit_test_env.prepend('PATH', test_env_common_path)
endif
foreach test : tests
exe = executable('test_@0@'.format(test), 'test_@0@.c'.format(test),
include_directories: [platform_inc],
dependencies: [
rz_util_dep,
rz_main_dep,
rz_socket_dep,
rz_core_dep,
rz_io_dep,
rz_bin_dep,
rz_flag_dep,
rz_cons_dep,
rz_asm_dep,
rz_debug_dep,
rz_config_dep,
rz_bp_dep,
rz_reg_dep,
rz_syscall_dep,
rz_analysis_dep,
rz_parse_dep,
rz_egg_dep,
rz_search_dep,
rz_hash_dep,
rz_crypto_dep,
rz_magic_dep,
lrt,
],
install: false,
install_rpath: rpath_exe,
implicit_include_directories: false
)
test(test, exe, workdir: join_paths(meson.current_source_dir(), '..'), env: unit_test_env)
endforeach
endif