tests: move to t, allow yath test
from root
By moving the tests subdirectory to t, we gain the ability to run `yath test` with no arguments from inside `nix develop` in the root of the the repo. (`nix develop` is necessary in order to set the proper env vars for `yath` to find our test libraries.)
This commit is contained in:
33
t/jobs/runcommand.nix
Normal file
33
t/jobs/runcommand.nix
Normal file
@ -0,0 +1,33 @@
|
||||
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"
|
||||
''
|
||||
)
|
||||
];
|
||||
}
|
||||
) // {
|
||||
meta = {
|
||||
license = "GPL";
|
||||
description = "An example meta property.";
|
||||
homepage = "https://github.com/NixOS/hydra";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user