xref: /freebsd/crypto/libecc/src/tests/meson.build (revision dd21556857e8d40f66bf5ad54754d9d52669ebf7)
1hostcc = meson.get_compiler('c', native: true)
2
3# ec_self_test tests suite
4ec_self_test_src = files(
5  'ec_self_tests_core.c',
6  'ec_self_tests.c',
7)
8
9# the executable is built with the same architecture
10# as the library itself, meaning that in case of cross-compilation
11# the test binary have the same architecture.
12#
13# Yet, it can still be executed on the build machine architecture if
14# the cross file used has declared an 'exe_wrapper' entry, such as,
15# for e.g. in a arm32 cross-file:
16#
17# [binaries]
18# exe_wrapper = 'qemu-arm-static'
19
20ec_self_test = executable(
21    'ec_self_test',
22    sources: [
23      ec_self_test_src,
24      external_deps_src,
25    ],
26    dependencies: libsign_dep,
27    include_directories: ecc_inc,
28    c_args: build_args,
29    install: false,
30)
31
32test(
33    'vectors',
34    ec_self_test,
35    args: 'vectors',
36    timeout: 120,
37)
38
39# ec_tuils tests suite is kept native as it is a build machine tooling
40ec_utils_src = files(
41  'ec_utils.c',
42)
43
44ec_utils = executable(
45    'ec_utils',
46    sources: [
47      ec_utils_src,
48      external_deps_src,
49    ],
50    dependencies: native_libsign_dep,
51    include_directories: ecc_inc,
52    c_args: build_args,
53    native: true,
54    install: false,
55)
56