summaryrefslogtreecommitdiff
path: root/test/display/meson.build
blob: 49928e33b89e826cefdc9bacdecc8e474bf96090 (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
tests = {
  'test-nautilus-directory-async': {},
  'test-file-operations-create': {},
  'test-files-view': {
    'suite': ['tracker'],
    'tracker': true,
    'is_parallel' : false,
  },
  'test-icon-info': {},
  'test-image': {},
  'test-sidebar': {
    'is_parallel' : false,
  },
  'test-portal-file-chooser': {
    'is_parallel' : false,
  },
  'test-properties': {},
  'test-thumbnails': {},
}

foreach test_name, extra_args : tests
  source = test_name + '.c'
  suite = ['display'] + extra_args.get('suite', [])
  test_exe = executable(test_name, source, dependencies: [libnautilus_dep, libtestutils_dep])
  args = []
  exe = []
  is_parallel = extra_args.get('is_parallel', true)

  if extra_args.get('tracker', false)
    # Tests that read and write from the Tracker index are run using 'tracker-sandbox'
    # script to use a temporary instance of tracker-miner-fs instead of the session one.
    exe = tracker_sandbox
    args = ['test-sandbox', '--store-tmpdir', '--index-recursive-tmpdir', test_exe]
  else
    exe = test_exe
  endif

  test(
    test_name,
    exe,
    args: args,
    env: [
      test_env,
      'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
      'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir())
    ],
    is_parallel: is_parallel,
    timeout: 480,
    suite: suite,
  )
endforeach