1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

perl: Allow running yath test in the build directory

For most purposes, the stock `ninja test` should be fine, but this
allows for doing other things with the `yath` during development.
This commit is contained in:
John Ericson 2024-04-25 16:07:00 -04:00
parent fc1d9023a2
commit 1ac635d600
4 changed files with 15 additions and 7 deletions

View file

@ -138,15 +138,23 @@ nix_perl_store_dep_list = [
# # build
# #-------------------------------------------------
subdir('lib/Nix')
lib_dir = join_paths('lib', 'Nix')
subdir(lib_dir)
if get_option('tests').enabled()
yath_rc_conf = configuration_data()
yath_rc_conf.set('lib_dir', lib_dir)
yath_rc = configure_file(
output : '.yath.rc',
input : '.yath.rc.in',
configuration : yath_rc_conf,
)
subdir('t')
test(
'nix-perl-test',
yath,
args : [
'-I=@0@'.format( join_paths( meson.current_build_dir(), 'lib', 'Nix') ),
],
args : ['test'],
workdir : meson.current_build_dir(),
depends : [nix_perl_store_lib],
)
endif