Debian Codegraph @

tests/meson.build

raw
1 psl_dafsa = custom_target('psl.dafsa',
2 input : psl_file,
3 output : 'psl.dafsa',
4 build_by_default: false,
5 command : [python, psl_make_dafsa, '--output-format=binary', '@INPUT@', '@OUTPUT@'])
6
7 psl_ascii_dafsa = custom_target('psl_ascii.dafsa',
8 input : psl_file,
9 output : 'psl_ascii.dafsa',
10 build_by_default: false,
11 command : [python, psl_make_dafsa, '--output-format=binary', '--encoding=ascii', '@INPUT@', '@OUTPUT@'])
12
13 fsmod = import('fs')
14 tests_cargs = [
15 '-DHAVE_CONFIG_H',
16 '-DSRCDIR="@0@"'.format(meson.current_source_dir()),
17 '-DPSL_FILE="@0@"'.format(psl_file),
18 '-DPSL_TESTFILE="@0@"'.format(psl_test_file),
19 '-DPSL_DAFSA="@0@"'.format(fsmod.as_posix(psl_dafsa.full_path())),
20 '-DPSL_ASCII_DAFSA="@0@"'.format(fsmod.as_posix(psl_ascii_dafsa.full_path())),
21 ]
22
23 tests = [
24 'test-is-public',
25 'test-is-public-all',
26 'test-is-cookie-domain-acceptable',
27 ]
28
29 if enable_builtin
30 tests += ['test-is-public-builtin', 'test-registrable-domain']
31 endif
32
33 foreach test_name : tests
34 source = test_name + '.c'
35 exe = executable(test_name, source,
36 build_by_default: false,
37 c_args : tests_cargs,
38 link_with : libpsl,
39 include_directories : configinc,
40 link_language : link_language,
41 dependencies : [libpsl_dep, networking_deps])
42 test(test_name, exe, depends : [psl_dafsa, psl_ascii_dafsa])
43 endforeach