File: meson.build

package info (click to toggle)
libpsl 0.21.2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 46,848 kB
  • sloc: ansic: 2,450; python: 515; sh: 309; makefile: 262
file content (39 lines) | stat: -rw-r--r-- 1,203 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
psl_dafsa = custom_target('psl.dafsa',
  input : psl_file,
  output : 'psl.dafsa',
  command : [python, psl_make_dafsa, '--output-format=binary', '@INPUT@', '@OUTPUT@'])

psl_ascii_dafsa = custom_target('psl_ascii.dafsa',
  input : psl_file,
  output : 'psl_ascii.dafsa',
  command : [python, psl_make_dafsa, '--output-format=binary', '--encoding=ascii', '@INPUT@', '@OUTPUT@'])

tests_cargs = [
  '-DHAVE_CONFIG_H',
  '-DSRCDIR="@0@"'.format(meson.current_source_dir()),
  '-DPSL_FILE="@0@"'.format(psl_file),
  '-DPSL_TESTFILE="@0@"'.format(psl_test_file),
  '-DPSL_DAFSA="@0@"'.format(psl_dafsa.full_path()),
  '-DPSL_ASCII_DAFSA="@0@"'.format(psl_ascii_dafsa.full_path()),
]

tests = [
  'test-is-public',
  'test-is-public-all',
  'test-is-cookie-domain-acceptable',
]

if enable_builtin
  tests += ['test-is-public-builtin', 'test-registrable-domain']
endif

foreach test_name : tests
  source = test_name + '.c'
  exe = executable(test_name, source,
    c_args : tests_cargs,
    link_with : libpsl,
    include_directories : configinc,
    link_language : link_language,
    dependencies : [libpsl_dep, networking_deps])
  test(test_name, exe, depends : [psl_dafsa, psl_ascii_dafsa])
endforeach