mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 06:52:43 +01:00
Make functional tests depend on nix binary so they auto recompile
With this I'm able to do a fresh config + meson test with all dependencies correctly propagated. Co-authored-by: Sergei Zimmerman <sergei@zimmerman.foo>
This commit is contained in:
parent
241420a788
commit
bf320465ae
5 changed files with 21 additions and 6 deletions
|
|
@ -211,6 +211,7 @@ if host_machine.system() == 'windows'
|
|||
executable_suffix = '.exe'
|
||||
endif
|
||||
|
||||
nix_symlinks_targets = []
|
||||
foreach linkname : nix_symlinks
|
||||
install_symlink(
|
||||
linkname + executable_suffix,
|
||||
|
|
@ -220,7 +221,7 @@ foreach linkname : nix_symlinks
|
|||
# The 'runtime' tag is what executables default to, which we want to emulate here.
|
||||
install_tag : 'runtime',
|
||||
)
|
||||
custom_target(
|
||||
symlink_target = custom_target(
|
||||
command : [ 'ln', '-sf', fs.name(this_exe), '@OUTPUT@' ],
|
||||
output : linkname + executable_suffix,
|
||||
# native doesn't allow dangling symlinks, but the target executable often doesn't exist at this time
|
||||
|
|
@ -230,6 +231,7 @@ foreach linkname : nix_symlinks
|
|||
)
|
||||
# TODO(Ericson3214): Doesn't yet work
|
||||
#meson.override_find_program(linkname, t)
|
||||
nix_symlinks_targets += symlink_target
|
||||
endforeach
|
||||
|
||||
install_symlink(
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ nix_perl_scripts = files(
|
|||
'Utils.pm',
|
||||
)
|
||||
|
||||
nix_perl_scripts_copy_tgts = []
|
||||
foreach f : nix_perl_scripts
|
||||
fs.copyfile(f)
|
||||
nix_perl_scripts_copy_tgts += fs.copyfile(f)
|
||||
endforeach
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -191,6 +191,6 @@ if get_option('tests').enabled()
|
|||
yath,
|
||||
args : [ 'test' ],
|
||||
workdir : meson.current_build_dir(),
|
||||
depends : [ nix_perl_store_lib ],
|
||||
depends : [ nix_perl_store_lib ] + nix_perl_tests_copy_tgts + nix_perl_scripts_copy_tgts,
|
||||
)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ nix_perl_tests = files(
|
|||
'init.t',
|
||||
)
|
||||
|
||||
|
||||
nix_perl_tests_copy_tgts = []
|
||||
foreach f : nix_perl_tests
|
||||
fs.copyfile(f)
|
||||
nix_perl_tests_copy_tgts += fs.copyfile(f)
|
||||
endforeach
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue