RunCommand: Test

This commit is contained in:
Graham Christensen
2021-02-23 16:10:34 -05:00
parent b2520267a9
commit 3fda37f65a
4 changed files with 180 additions and 2 deletions

25
tests/jobs/runcommand.nix Normal file
View File

@ -0,0 +1,25 @@
with import ./config.nix;
{
metrics = mkDerivation {
name = "my-build-product";
builder = "/bin/sh";
outputs = [ "out" "bin" ];
args = [
(
builtins.toFile "builder.sh" ''
#! /bin/sh
echo "$PATH"
mkdir $bin
echo "foo" > $bin/bar
metrics=$out/nix-support/hydra-metrics
mkdir -p "$(dirname "$metrics")"
echo "lineCoverage 18 %" >> "$metrics"
echo "maxResident 27 KiB" >> "$metrics"
''
)
];
};
}