1refcount_tests = { 2 'objects' : {}, 3 'objects2' : {'suite' : ['slow']}, 4 'properties' : {}, 5 'properties2' : {'suite' : ['slow']}, 6 'properties3' : {'suite' : ['slow']}, 7 'properties4' : {}, 8 'signal1' : { 9 'source' : 'signals.c', 10 'c_args' : ['-DTESTNUM=1'], 11 }, 12 'signal2' : { 13 'source' : 'signals.c', 14 'c_args' : ['-DTESTNUM=2'], 15 }, 16 'signal3' : { 17 'source' : 'signals.c', 18 'c_args' : ['-DTESTNUM=3'], 19 }, 20 'signal4' : { 21 'source' : 'signals.c', 22 'c_args' : ['-DTESTNUM=4'], 23 }, 24} 25 26common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'] 27common_deps = [libm, thread_dep, libglib_dep, libgobject_dep] 28 29foreach test_name, extra_args : refcount_tests 30 source = extra_args.get('source', test_name + '.c') 31 extra_sources = extra_args.get('extra_sources', []) 32 install = installed_tests_enabled and extra_args.get('install', true) 33 34 if install 35 test_conf = configuration_data() 36 test_conf.set('installed_tests_dir', installed_tests_execdir) 37 test_conf.set('program', test_name) 38 test_conf.set('env', '') 39 configure_file( 40 input: installed_tests_template, 41 output: test_name + '.test', 42 install_dir: installed_tests_metadir, 43 configuration: test_conf 44 ) 45 endif 46 47 # FIXME? $(GLIB_DEBUG_FLAGS) 48 exe = executable(test_name, [source, extra_sources], 49 c_args : common_c_args + extra_args.get('c_args', []), 50 dependencies : common_deps + extra_args.get('dependencies', []), 51 install_dir: installed_tests_execdir, 52 install: install, 53 ) 54 55 suite = ['refcount'] + extra_args.get('suite', []) 56 timeout = suite.contains('slow') ? test_timeout_slow : test_timeout 57 58 # FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset 59 test(test_name, exe, env : test_env, timeout : timeout, suite : suite) 60endforeach 61