Imported Upstream version 1.2.4
[platform/upstream/json-glib.git] / json-glib / tests / meson.build
1 tests = [
2   'array',
3   'boxed',
4   'builder',
5   'generator',
6   'gvariant',
7   'invalid',
8   'node',
9   'object',
10   'parser',
11   'path',
12   'reader',
13   'serialize-simple',
14   'serialize-complex',
15   'serialize-full',
16 ]
17
18 python3 = find_program('python3')
19
20 test_data = [
21   'stream-load.json',
22 ]
23
24 foreach d: test_data
25   copy = 'from shutil import copyfile; copyfile("@0@", "@1@")'.format(d, join_paths(meson.current_build_dir(), d))
26   cp = run_command(python3, '-c', copy)
27   if cp.returncode() != 0
28     error('Could not copy file: ' + cp.stderr())
29   endif
30 endforeach
31
32 foreach t: tests
33   exe = executable(t, '@0@.c'.format(t),
34                    c_args: json_c_args,
35                    dependencies: [ json_glib_dep, ])
36   test(t, exe)
37 endforeach