uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
38
nixos/tests/collectd.nix
Normal file
38
nixos/tests/collectd.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "collectd";
|
||||
meta = { };
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.collectd = {
|
||||
enable = true;
|
||||
extraConfig = lib.mkBefore ''
|
||||
Interval 30
|
||||
'';
|
||||
plugins = {
|
||||
rrdtool = ''
|
||||
DataDir "/var/lib/collectd/rrd"
|
||||
'';
|
||||
load = "";
|
||||
};
|
||||
};
|
||||
environment.systemPackages = [ pkgs.rrdtool ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.wait_for_unit("collectd.service")
|
||||
hostname = machine.succeed("hostname").strip()
|
||||
file = f"/var/lib/collectd/rrd/{hostname}/load/load.rrd"
|
||||
machine.wait_for_file(file);
|
||||
machine.succeed(f"rrdinfo {file} | logger")
|
||||
# check that this file contains a shortterm metric
|
||||
machine.succeed(f"rrdinfo {file} | grep -F 'ds[shortterm].min = '")
|
||||
# check that interval was set before the plugins
|
||||
machine.succeed(f"rrdinfo {file} | grep -F 'step = 30'")
|
||||
# check that there are frequent updates
|
||||
machine.succeed(f"cp {file} before")
|
||||
machine.wait_until_fails(f"cmp before {file}")
|
||||
'';
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue