File: meson.build

package info (click to toggle)
fwupd 2.0.20-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 32,504 kB
  • sloc: ansic: 277,388; python: 11,485; xml: 9,493; sh: 1,625; makefile: 167; cpp: 19; asm: 11; javascript: 9
file content (180 lines) | stat: -rw-r--r-- 4,281 bytes parent folder | download | duplicates (2)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
con2 = configuration_data()
con2.set('installedtestsdir', installed_test_datadir)
con2.set('installedtestsbindir', installed_test_bindir)
con2.set('installedtestsdatadir', installed_test_datadir)
con2.set('devicetestdir', join_paths(installed_test_datadir, 'device-tests'))
con2.set('bindir', bindir)
con2.set('libexecdir', libexecdir)
con2.set('localstatedir', localstatedir)

configure_file(
  input: 'fwupdmgr.test.in',
  output: 'fwupdmgr.test',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupdmgr-online.test.in',
  output: 'fwupdmgr-online.test',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupdmgr-p2p.test.in',
  output: 'fwupdmgr-p2p.test',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupdtool.test.in',
  output: 'fwupdtool.test',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupdtool-efiboot.test.in',
  output: 'fwupdtool-efiboot.test',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupd.test.in',
  output: 'fwupd.test',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupdmgr-p2p.sh',
  output: 'fwupdmgr-p2p.sh',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

install_data(
  [
    'build-certs.py',
    'fakedevice124.bin',
    'fakedevice124.jcat',
    'fakedevice124.metainfo.xml',
    'fwupd-tests.xml',
    'lsan-suppressions.txt',
  ],
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupdmgr.sh',
  output: 'fwupdmgr.sh',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupdmgr-online.sh',
  output: 'fwupdmgr-online.sh',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupdtool.sh',
  output: 'fwupdtool.sh',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupdtool-efiboot.sh',
  output: 'fwupdtool-efiboot.sh',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

configure_file(
  input: 'fwupd.sh',
  output: 'fwupd.sh',
  configuration: con2,
  install: true,
  install_dir: installed_test_datadir,
)

custom_target(
  'installed-cab123',
  input: ['fakedevice123.bin', 'fakedevice123.jcat', 'fakedevice123.metainfo.xml'],
  output: 'fakedevice123.cab',
  command: [gcab, '--create', '@OUTPUT@', '@INPUT@'],
  install: true,
  install_dir: installed_test_datadir,
)
custom_target(
  'installed-cab124',
  input: ['fakedevice124.bin', 'fakedevice124.jcat', 'fakedevice124.metainfo.xml'],
  output: 'fakedevice124.cab',
  command: [gcab, '--create', '@OUTPUT@', '@INPUT@'],
  install: true,
  install_dir: installed_test_datadir,
)

# replace @installedtestsdir@
configure_file(
  input: 'remote.conf.in',
  output: 'fwupd-tests.conf',
  configuration: con2,
  install: true,
  install_tag: 'tests',
  install_dir: join_paths(datadir, 'fwupd', 'remotes.d'),
)

if umockdev_integration_tests.allowed()
  fwupd_mockdev_tests = files('fwupd_test.py')
  r = run_command(
    unittest_inspector,
    fwupd_mockdev_tests,
    check: true,
  )
  unit_tests = r.stdout().strip().split('\n')
  foreach ut : unit_tests
    test(
      ut,
      python3,
      args: [fwupd_mockdev_tests, ut],
      is_parallel: false,
      env: {
        'CACHE_DIRECTORY': join_paths(meson.project_build_root(), 'cache'),
        'DAEMON_BUILDDIR': join_paths(meson.project_build_root(), 'src'),
        'GI_TYPELIB_PATH': join_paths(meson.project_build_root(), 'libfwupd'),
        'LD_LIBRARY_PATH': join_paths(meson.project_build_root(), 'libfwupd'),
        'STATE_DIRECTORY': join_paths(meson.project_build_root(), 'state'),
      },
    )
  endforeach
  configure_file(
    input: fwupd_mockdev_tests,
    output: 'fwupd_test.py',
    configuration: {
      'LIBEXECDIR': daemon_dir,
    },
    install_dir: installed_test_datadir,
  )
  install_data(
    'fwupd_ioc.py',
    install_dir: installed_test_datadir,
  )
endif