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