Files
git/contrib/credential/netrc/meson.build
Patrick Steinhardt b44e63f405 meson: introduce kwargs variable for tests
Meson has the ability to create a kwargs dictionary that can then be
passed to any function call with the `kwargs:` positional argument. This
allows one to deduplicate common parameters that one wishes to pass to
several different function invocations.

Our tests already have one common parameter that we use everywhere,
"timeout", and we're about to add a second common parameter in the next
commit. Let's prepare for this by introducing `test_kwargs` so that we
can deduplicate these common arguments.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-06-02 07:51:43 -07:00

23 lines
696 B
Meson

credential_netrc = custom_target(
input: 'git-credential-netrc.perl',
output: 'git-credential-netrc',
command: generate_perl_command,
depends: [git_version_file],
install: true,
install_dir: get_option('libexecdir') / 'git-core',
)
if get_option('tests')
credential_netrc_testenv = test_environment
credential_netrc_testenv.set('CREDENTIAL_NETRC_PATH', credential_netrc.full_path())
test('t-git-credential-netrc',
shell,
args: [ meson.current_source_dir() / 't-git-credential-netrc.sh' ],
workdir: meson.current_source_dir(),
env: credential_netrc_testenv,
depends: test_dependencies + bin_wrappers + [credential_netrc],
kwargs: test_kwargs,
)
endif