Merging gst-devtools
[platform/upstream/gstreamer.git] / subprojects / gst-devtools / validate / tests / check / meson.build
1 # tests and condition when to skip the test
2 validate_tests = [
3   ['validate/padmonitor'],
4   ['validate/monitoring'],
5   ['validate/reporting'],
6   ['validate/overrides'],
7   ['validate/scenario'],
8   ['validate/utilities'],
9   ['validate/expression_parser'],
10 ]
11
12 test_defines = [
13   '-UG_DISABLE_ASSERT',
14   '-UG_DISABLE_CAST_CHECKS',
15   '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
16   '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
17   '-DGST_USE_UNSTABLE_API',
18 ]
19
20 foreach t : validate_tests
21   fname = '@0@.c'.format(t.get(0))
22   test_name = t.get(0).underscorify()
23   if t.length() == 2
24     skip_test = t.get(1)
25   else
26     skip_test = false
27   endif
28
29   if not skip_test
30     env = environment()
31     env.set('GST_STATE_IGNORE_ELEMENTS', '')
32     env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
33     env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
34     env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
35     env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
36
37     exe = executable(test_name, fname,
38         'validate/test-utils.c',
39         c_args : gst_c_args + test_defines,
40         include_directories : [inc_dirs],
41         dependencies : [validate_dep, gst_check_dep],
42         link_with: gstvalidate
43     )
44     env.set('GST_REGISTRY',
45             '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
46     test(test_name, exe, env: env)
47   endif
48 endforeach
49