lib/tests: remove deprecated dontRun

This commit is contained in:
Gaetan Lepage 2024-12-23 10:45:55 +01:00 committed by nix-infra-bot
parent 472526d7aa
commit f1b5c2c593

View file

@ -13,22 +13,14 @@ let
{ {
name, name,
nvim, nvim,
# TODO: Deprecated 2024-08-20, remove after 24.11
dontRun ? false,
... ...
}@args: }:
let let
# FIXME: this doesn't support helpers.enableExceptInTests, a context option would be better # FIXME: this doesn't support helpers.enableExceptInTests, a context option would be better
result = nvim.extend { result = nvim.extend {
config.test = config.test = {
{ inherit name;
inherit name; };
}
// lib.optionalAttrs (args ? dontRun) (
lib.warn
"mkTestDerivationFromNvim: the `dontRun` argument is deprecated. You should use the `test.runNvim` module option instead."
{ runNvim = !dontRun; }
);
}; };
in in
result.config.build.test; result.config.build.test;
@ -41,9 +33,7 @@ let
pkgs ? defaultPkgs, pkgs ? defaultPkgs,
module, module,
extraSpecialArgs ? { }, extraSpecialArgs ? { },
# TODO: Deprecated 2024-08-20, remove after 24.11 }:
dontRun ? false,
}@args:
let let
# NOTE: we are importing this just for evalNixvim # NOTE: we are importing this just for evalNixvim
helpers = self.lib.nixvim.override { helpers = self.lib.nixvim.override {
@ -56,11 +46,6 @@ let
modules = [ modules = [
module module
(lib.optionalAttrs (name != null) { test.name = name; }) (lib.optionalAttrs (name != null) { test.name = name; })
(lib.optionalAttrs (args ? dontRun) (
lib.warn
"mkTestDerivationFromNixvimModule: the `dontRun` argument is deprecated. You should use the `test.runNvim` module option instead."
{ config.test.runNvim = !dontRun; }
))
{ wrapRc = true; } { wrapRc = true; }
# TODO: Only do this when `args?pkgs` # TODO: Only do this when `args?pkgs`
# Consider deprecating the `pkgs` arg too... # Consider deprecating the `pkgs` arg too...