File: meson.build

package info (click to toggle)
game-data-packager 87
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 33,392 kB
  • sloc: python: 15,387; sh: 704; ansic: 95; makefile: 50
file content (110 lines) | stat: -rw-r--r-- 1,892 bytes parent folder | download | duplicates (3)
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
108
109
110
# Copyright 2022 Simon McVittie
# SPDX-License-Identifier: FSFAP

subdir('data')
subdir('vfs')

make_vfs_zip = [
  python,
  files(meson.project_source_root() / 'tools' / 'make-vfs-zip.py'),
  '@OUTPUT@',
] + test_vfs_files

custom_target(
  'vfs.zip',
  build_by_default : true,
  command : make_vfs_zip,
  input : test_vfs_files,
  output : 'vfs.zip',
)

custom_target(
  'changelog.gz',
  build_by_default : true,
  capture : true,
  command : ['gzip', '-nc9', '@INPUT@'],
  input : meson.project_source_root() / 'debian' / 'changelog',
  output : 'changelog.gz',
  install_dir : pkgdatadir,
)

configure_file(
  copy : true,
  input : meson.project_source_root() / 'data' / 'copyright',
  output : 'copyright',
)

test_env = environment([
  'GDP_BUILDDIR=' + meson.project_build_root(),
  'GDP_PKGDATADIR=' + meson.project_build_root(),
  'GDP_SRCDIR=' + meson.project_source_root(),
  'GDP_UNINSTALLED=1',
  'LC_ALL=C.UTF-8',
  'PYTHONPATH=' + meson.project_source_root(),
])

if get_option('werror')
  test_env.set('LINT_WARNINGS_ARE_ERRORS', '1')
endif

foreach t : [
  'pycodestyle',
  'pyflakes',
  'reuse',
]
  test(
    t,
    files(t + '.sh'),
    env : test_env,
    protocol : 'tap',
    suite : 'lint',
    timeout : 90,
  )
endforeach

foreach t : [
  'deb',
  'hashed_file',
  'integration',
  'rpm',
  'umod',
  'version',
]
  test(
    t,
    python,
    args : [files(t + '.py')],
    env : test_env,
    protocol : 'tap',
  )
endforeach

foreach t : [
  'check_syntax',
  'check_equivalence',
]
  test(
    t,
    python,
    args : [files(meson.project_source_root() / 'tools' / t + '.py')],
    env : test_env,
    suite : 'slow',
    timeout : 150,
  )
endforeach

foreach t : [
  'download_shareware',
]
  test(
    t,
    python,
    args : [files(t + '.py')],
    env : test_env,
    suite : [
      'network',
      'slow',
    ],
    timeout : 60,
  )
endforeach