summaryrefslogtreecommitdiff
path: root/test/meson.build
blob: 53c3c97988db7ee1ca4ce34877bd5397438bada0 (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
if enable_installed_tests
  installed_tests_execdir = join_paths(gvfs_libexecdir, 'installed-tests', gvfs_name)
  installed_tests_metadir = join_paths(gvfs_datadir, 'installed-tests', gvfs_name)

  tests_conf = configuration_data()
  tests_conf.set('testdir', installed_tests_execdir)

  session = 'session.conf'

  configure_file(
    input: session + '.in',
    output: session,
    install: true,
    install_dir: installed_tests_execdir,
    configuration: tests_conf
  )

  all_tests = 'gvfs-all-tests'

  configure_file(
    input: all_tests + '.in',
    output: all_tests + '.test',
    install: true,
    install_dir: installed_tests_metadir,
    configuration: tests_conf
  )

  install_subdir(
    'files',
    install_dir: installed_tests_execdir
  )

  gvfs_test = files('gvfs-test')

  test_data = gvfs_test + [
    daemon_service,
    metadata_service
  ]

  if enable_afc
    test_data += [afc_monitor, afc_service]
  endif

  if enable_gphoto2
    test_data += [gphoto2_monitor, gphoto2_service]
  endif

  if enable_udisks2
    test_data += [udisks2_monitor, udisks2_service]
  endif

  install_data(
    test_data,
    install_dir: installed_tests_execdir
  )
endif

if enable_devel_utils
  tests = [
    'benchmark-gvfs-big-files',
    'benchmark-gvfs-small-files',
    'benchmark-posix-big-files',
    'benchmark-posix-small-files',
    'test-query-info-stream'
  ]

  deps = [
    gio_dep,
    glib_dep
  ]

  foreach test: tests
    executable(
      test,
      test + '.c',
      include_directories: top_inc,
      dependencies: deps
    )
  endforeach
endif