From 038daad2182a22c81861ee7cbb5f0c85f6bb16ba Mon Sep 17 00:00:00 2001 From: Qyriad Date: Mon, 25 Mar 2024 12:12:56 -0600 Subject: meson: implement functional tests Functional tests can be run with `meson test -C build --suite installcheck`. Notably, functional tests must be run *after* running `meson install` (Lix's derivation runs the installcheck suite in installCheckPhase so it does this correctly), due to some quirks between Meson and the testing system. As far as I can tell the functional tests are meant to be run after installing anyway, but unfortunately I can't transparently make `meson test --suite installcheck` depend on the install targets. The script that runs the functional tests, meson/run-test.py, checks that `meson install` has happened and fails fast with a (hopefully) helpful error message if any of the functional tests are run before installing. TODO: this change needs reflection in developer documentation Change-Id: I8dcb5fdfc0b6cb17580973d24ad930abd57018f6 --- scripts/meson.build | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 scripts/meson.build (limited to 'scripts') diff --git a/scripts/meson.build b/scripts/meson.build new file mode 100644 index 000000000..4fe584850 --- /dev/null +++ b/scripts/meson.build @@ -0,0 +1,14 @@ +configure_file( + input : 'nix-profile.sh.in', + output : 'nix-profile.sh', + configuration : { + 'localstatedir': state_dir, + } +) + +# https://github.com/mesonbuild/meson/issues/860 +configure_file( + input : 'nix-profile.sh.in', + output : 'nix-profile.sh.in', + copy : true, +) -- cgit v1.2.3