fs = import('fs') test_env = [] if get_option('b_sanitize').contains('address') test_env += 'ASAN_OPTIONS=detect_leaks=1:abort_on_error=1:print_stats=1' endif if get_option('b_sanitize').contains('undefined') test_env += 'UBSAN_OPTIONS=print_stacktrace=1:abort_on_error=1' endif test_sources = [ 't_vector.c', 't_list.c', 't_hashmap.c', 't_treemap.c', ] foreach test_source : test_sources test_name = fs.replace_suffix(test_source, '') test_exe = executable(test_name, test_source, dependencies : libderp_dep, c_args : get_option('b_sanitize').contains('address') ? [] : ['-DTEST_HUGE_ALLOCATION_FAILURE=1'], install : false) test(test_name, test_exe, suite : 'libderp', env : test_env) endforeach