summaryrefslogtreecommitdiff
path: root/tests/meson.build
blob: b3087a7c1773381b709a8e8bcaa2c19225111e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
test_suites = {
  'rest': [
    'proxy',
    'proxy-continuous',
    'threaded',
    'xml',
    'custom-serialize',
    'oauth2',
    'params',
  ],
  'rest-extras': [
    'flickr',
    'lastfm',
  ],
}

test_deps = [
  glib_dep,
  libsoup_dep,
  librest_dep,
  librest_extras_dep,
]

test_env = [
  'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
  'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
]

foreach suite, test_names : test_suites
  foreach name : test_names
    test_bin = executable(name,
      ['@0@.c'.format(name), 'helper/test-server.c'],
      dependencies: test_deps,
      include_directories: config_h_inc,
    )

    test(name, test_bin,
      suite: suite,
      env: test_env,
    )
  endforeach
endforeach