diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/default.nix | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/tests/default.nix b/tests/default.nix index 95f3856..b9e1057 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -4,14 +4,16 @@ # populate's scenarios that expect populate to refuse its arguments, which # pkgs.populate does during evaluation here, and the scenarios of # populate's smoke test, with target attribute sets as mkTarget returns -# them, and pure, for pure evaluation, see ./pure.nix. Build all with nix-build tests, or one with, e.g., nix-build tests -# -A deploy. The exhaustive tests add the combinations of options that no -# code path tells apart from the ones the others cover; build them with -# nix-build tests -A exhaustive. The smoke test runs a few scenarios of -# each in a single VM test; build it with nix-build tests -A smoke. -# nix-build tests -A only --argstr only REGEX runs the scenarios whose -# names match the regular expression REGEX, of all of populate's scenarios -# and krops' own, in a single VM test, e.g. --argstr only 'lock-hooks-.*'. +# them, and pure, for pure evaluation, see ./pure.nix. Build all with +# nix-build tests, or one with, e.g., nix-build tests -A deploy. The +# exhaustive tests add the combinations of options that no code path tells +# apart from the ones the others cover; build them with nix-build tests -A +# exhaustive. The tests in extra, which nix-build doesn't build either, +# are for development: the smoke test runs a few scenarios of each in a +# single VM test; build it with nix-build tests -A extra.smoke. nix-build +# tests -A extra.only --argstr only REGEX runs the scenarios whose names +# match the regular expression REGEX, of all of populate's scenarios and +# krops' own, in a single VM test, e.g. --argstr only 'lock-hooks-.*'. # populate's own tests run the program directly; see # ../pkgs/populate/README.md. { pkgs ? import ../pkgs {}, only ? null }: @@ -129,7 +131,7 @@ let allScenarios; in if only == null then - throw "tests: -A only needs --argstr only REGEX" + throw "tests: -A extra.only needs --argstr only REGEX" else if selected == [] then throw "tests: no scenario's name matches ${builtins.toJSON only}" else @@ -163,11 +165,12 @@ assert !(krops.isLocalTarget (targets.remote "/")); assert checkReadmeVersion; testsOf false "" - # Not built by nix-build tests either, which runs these scenarios anyway. + # Attribute sets without recurseForDerivations, so nix-build tests doesn't + # build them: the tests built only on request, and the exhaustive ones. // { - smoke.smoke = vm "smoke" smokeScenarios; - only.only = vm "only" onlyScenarios; + extra = { + smoke = vm "smoke" smokeScenarios; + only = vm "only" onlyScenarios; + }; + exhaustive = testsOf true "exhaustive-"; } - # An attribute set without recurseForDerivations, so nix-build tests - # doesn't build them. - // { exhaustive = testsOf true "exhaustive-"; } |
