mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 23:36:16 +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:
parent
fc1d9023a2
commit
1ac635d600
4 changed files with 15 additions and 7 deletions
|
@ -1,2 +0,0 @@
|
||||||
[test]
|
|
||||||
-I=rel(lib/Nix)
|
|
2
perl/.yath.rc.in
Normal file
2
perl/.yath.rc.in
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[test]
|
||||||
|
-I=rel(@lib_dir@)
|
|
@ -26,7 +26,7 @@ perl.pkgs.toPerlModule (stdenv.mkDerivation (finalAttrs: {
|
||||||
./meson.build
|
./meson.build
|
||||||
./meson_options.txt
|
./meson_options.txt
|
||||||
] ++ lib.optionals finalAttrs.doCheck [
|
] ++ lib.optionals finalAttrs.doCheck [
|
||||||
./.yath.rc
|
./.yath.rc.in
|
||||||
./t
|
./t
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -138,15 +138,23 @@ nix_perl_store_dep_list = [
|
||||||
|
|
||||||
# # build
|
# # build
|
||||||
# #-------------------------------------------------
|
# #-------------------------------------------------
|
||||||
subdir('lib/Nix')
|
lib_dir = join_paths('lib', 'Nix')
|
||||||
|
subdir(lib_dir)
|
||||||
|
|
||||||
if get_option('tests').enabled()
|
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')
|
subdir('t')
|
||||||
test(
|
test(
|
||||||
'nix-perl-test',
|
'nix-perl-test',
|
||||||
yath,
|
yath,
|
||||||
args : [
|
args : ['test'],
|
||||||
'-I=@0@'.format( join_paths( meson.current_build_dir(), 'lib', 'Nix') ),
|
workdir : meson.current_build_dir(),
|
||||||
],
|
depends : [nix_perl_store_lib],
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue