bind9/tests/isc/meson.build
Štěpán Balážik 237489caf4 Use CMocka generated JUnit reports where possible
Where applicable, use the more detailed CMocka generated JUnit
reports which include subtest results and timings instead of the
one generated by Meson.

Flaky tests also require retrying, so use a wrapper and mark them
with a environment variable. This is done to avoid the need to compute
an intersection of suites in Meson which is not supported out-of-the-box
(`meson test --suite=foo,bar` runs the union of foo and bar).
2025-12-19 18:26:22 +00:00

109 lines
2.1 KiB
Meson

# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
isc_test = [
'ascii',
'async',
'buffer',
'counter',
'dnsstream_utils',
'errno',
'file',
'hash',
'hashmap',
'heap',
'histo',
'hmac',
'ht',
'job',
'lex',
'loop',
'md',
'mem',
'mutex',
'netaddr',
'parse',
'proxyheader',
'proxystream',
'proxyudp',
'quota',
'radix',
'ratelimiter',
'regex',
'result',
'rwlock',
'safe',
'siphash',
'sockaddr',
'spinlock',
'stats',
'symtab',
'tcp',
'tcpdns',
'time',
'timer',
'tls',
'tlsdns',
'udp',
'work',
]
flaky_isc_test = [
'proxystream',
]
is_el8 = run_command('grep', '-q', '-F', 'platform:el8', '/etc/os-release', check: false).returncode() == 0
if config.has('HAVE_LIBNGHTTP2') and not is_el8
isc_test += 'doh'
endif
foreach unit : isc_test
test_bin = executable(
unit,
files(
f'@unit@_test.c',
'netmgr_common.c',
'stream_shutdown.c',
),
build_by_default: false,
export_dynamic: true,
install: false,
dependencies: [
libisc_dep,
libtest_dep,
m_dep,
openssl_dep,
cmocka_dep,
nghttp2_dep,
],
)
suites = ['isc', 'cmocka']
env = environment()
timeout = 300
if unit in flaky_isc_test
suites += 'flaky'
# Pass FLAKY and TIMEOUT to the test wrapper so it can retry appropriately
env.set('FLAKY', '1')
env.set('TIMEOUT', timeout.to_string())
endif
test(
unit,
test_bin,
suite: suites,
timeout: timeout,
workdir: meson.current_source_dir(),
env: env,
)
endforeach