diff --git a/ofborg/test-srcs/eval-mixed-failure/default.nix b/ofborg/test-srcs/eval-mixed-failure/default.nix new file mode 100644 index 0000000..8d157ac --- /dev/null +++ b/ofborg/test-srcs/eval-mixed-failure/default.nix @@ -0,0 +1,34 @@ +let + nix = import ; +in rec { + success = derivation { + name = "success"; + system = builtins.currentSystem; + builder = nix.shell; + args = [ + "-c" + "echo hi; echo ${toString builtins.currentTime} > $out" ]; + }; + + failed = derivation { + name = "failed"; + system = builtins.currentSystem; + builder = nix.shell; + args = [ + "-c" + "echo hi; echo ${toString builtins.currentTime}; echo ${success}" ]; + }; + + passes-instantiation = derivation { + name = "passes-instantiation"; + system = builtins.currentSystem; + builder = nix.shell; + args = [ + "-c" + "echo this ones cool" ]; + }; + + fails-instantiation = assert builtins.trace '' + You just can't frooble the frozz on this particular system. + '' false; {}; +}