File: meson.build

package info (click to toggle)
git-evtag 2022.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 380 kB
  • sloc: ansic: 841; sh: 389; python: 86; makefile: 48; xml: 48
file content (52 lines) | stat: -rw-r--r-- 1,216 bytes parent folder | download
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
# Copyright 2022 Simon McVittie
# SPDX-License-Identifier: MIT

insttestdir = get_option('libexecdir') / 'installed-tests' / meson.project_name()
insttestmetadir = get_option('datadir') / 'installed-tests' / meson.project_name()

test_scripts = [
  'test-basic.sh',
]

test_env = environment()
test_env.prepend('PATH', project_build_root / 'src')
test_env.set('G_TEST_BUILDDIR', project_build_root)
test_env.set('G_TEST_SRCDIR', project_source_root)

foreach test_script : test_scripts
  test(
    test_script,
    files('tap-test'),
    args : [files(test_script)],
    env : test_env,
    protocol : 'tap',
  )

  if get_option('install_tests')
    configure_file(
      input : 'tap.test.in',
      output : test_script + '.test',
      configuration : {
        'basename' : test_script,
        'insttestdir' : get_option('prefix') / insttestdir,
      },
      install_dir : insttestmetadir,
    )
  endif
endforeach

if get_option('install_tests')
  install_data(
    'libtest.sh',
    install_dir : insttestdir,
  )
  install_data(
    test_scripts + [
      project_source_root / 'src/git-evtag-compute-py',
    ],
    install_dir : insttestdir,
    install_mode : 'rwxr-xr-x',
  )
endif

subdir('gpghome')