summaryrefslogtreecommitdiff
path: root/tests/eds/meson.build
blob: 9ef5c2c186ca11f310af349feb382bd79447b4c0 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
eds_tests_deps = [
  common_test_deps,
  posix_dep,
  libebook_dep,
  libedataserver_dep,
  libxml_dep,
  libeds_test_dep,
  eds_backendlib_dep,
]

eds_tests_vala_flags = [
  common_test_vala_flags,
]


# First we make the test helpers
helpers = [
  'helper-create-many-contacts',
  'helper-delete-contacts',
  'helper-prepare-aggregator',
]

foreach helper: helpers
  executable(helper,
    '@0@.vala'.format(helper),
    dependencies: eds_tests_deps,
    vala_args: eds_tests_vala_flags,
  )
endforeach

# in order from least to most complex
eds_tests = [
  'persona-store-tests',
  'individual-retrieval',
  'phone-details',
  'email-details',
  'name-details',
  'removing-contacts',
  'updating-phones',
  'updating-contacts',
  'avatar-details',
  'add-persona',
  'im-details',
  'postal-address-details',
  'remove-persona',
  'set-emails',
  'set-im-addresses',
  'link-personas',
  'add-contacts-stress-test',
  'set-properties',
  'set-properties-race',
  'linkable-properties',
  'link-personas-diff-stores',
  'store-removed',
  'anti-linking',
  'enable-disable-stores',
  'extended-info',
]

eds_benchmarks = [
  'perf',
]

foreach _test: eds_tests
  test_install_dir = installed_tests_dir / eds_backend_name

  test_executable = executable('eds-'+_test,
    '@0@.vala'.format(_test),
    dependencies: eds_tests_deps,
    vala_args: eds_tests_vala_flags,
    install: installed_tests_enabled,
    install_dir: test_install_dir,
  )

  test(_test, test_executable,
    suite: 'EDSBackend',
    is_parallel: false, # FIXME: https://gitlab.gnome.org/GNOME/folks/issues/69
    env: common_test_environment,
  )

  if installed_tests_enabled
    configure_file(
      input: installed_test_template_in,
      output: _test + '.test',
      configuration: {
        'libexecdir': folks_libexecdir,
        'installed_tests_dir': test_install_dir,
        'program': _test,
      },
      install_dir: installed_tests_meta_dir / eds_backend_name
    )
  endif
endforeach

foreach _benchmark: eds_benchmarks

  benchmark_executable = executable('eds-'+_benchmark,
    '@0@.vala'.format(_benchmark),
    dependencies: eds_tests_deps,
    vala_args: eds_tests_vala_flags,
  )

  benchmark(_benchmark, benchmark_executable,
    suite: 'EDSBackend',
    env: common_test_environment,
  )
endforeach