hydra-eval-jobset: write a test validating the events that comes out

This commit is contained in:
Graham Christensen
2022-01-10 16:49:35 -05:00
parent ae38cc5d04
commit 0ada412979
2 changed files with 121 additions and 0 deletions

View File

@ -0,0 +1,30 @@
# This file gets copied around, and intentionally does not refer to
# anything but itself as "default.nix".
let
simpleDerivation = name: builderText: derivation {
inherit name;
system = builtins.currentSystem;
builder = "/bin/sh";
args = [
(builtins.toFile "builder.sh" builderText)
];
};
in
{
stable-job-queued = simpleDerivation "stable-job-queued" ''
echo "here is a stable job that passes every time" > $out
'';
stable-job-passing = simpleDerivation "stable-job-passing" ''
echo "here is a stable job that passes every time" > $out
'';
stable-job-failing = simpleDerivation "stable-job-failing" ''
echo "this job is a stable job that fails every time" > $out
'';
variable-job = simpleDerivation "variable-job" ''
echo ${builtins.toFile "default.nix" (builtins.readFile ./default.nix)} > $out
'';
}