mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
parent
bdac73554f
commit
610021f4b6
2 changed files with 36 additions and 38 deletions
|
@ -460,7 +460,7 @@ in
|
||||||
evcc = runTest ./evcc.nix;
|
evcc = runTest ./evcc.nix;
|
||||||
fail2ban = runTest ./fail2ban.nix;
|
fail2ban = runTest ./fail2ban.nix;
|
||||||
fakeroute = handleTest ./fakeroute.nix { };
|
fakeroute = handleTest ./fakeroute.nix { };
|
||||||
fancontrol = handleTest ./fancontrol.nix { };
|
fancontrol = runTest ./fancontrol.nix;
|
||||||
fanout = handleTest ./fanout.nix { };
|
fanout = handleTest ./fanout.nix { };
|
||||||
fcitx5 = handleTest ./fcitx5 { };
|
fcitx5 = handleTest ./fcitx5 { };
|
||||||
fedimintd = runTest ./fedimintd.nix;
|
fedimintd = runTest ./fedimintd.nix;
|
||||||
|
|
|
@ -1,39 +1,37 @@
|
||||||
import ./make-test-python.nix (
|
{ pkgs, ... }:
|
||||||
{ pkgs, ... }:
|
{
|
||||||
{
|
name = "fancontrol";
|
||||||
name = "fancontrol";
|
meta = with pkgs.lib.maintainers; {
|
||||||
meta = with pkgs.lib.maintainers; {
|
maintainers = [ evils ];
|
||||||
maintainers = [ evils ];
|
};
|
||||||
|
|
||||||
|
nodes.machine =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [ ../modules/profiles/minimal.nix ];
|
||||||
|
hardware.fancontrol.enable = true;
|
||||||
|
hardware.fancontrol.config = ''
|
||||||
|
INTERVAL=42
|
||||||
|
DEVPATH=hwmon1=devices/platform/dummy
|
||||||
|
DEVNAME=hwmon1=dummy
|
||||||
|
FCTEMPS=hwmon1/device/pwm1=hwmon1/device/temp1_input
|
||||||
|
FCFANS=hwmon1/device/pwm1=hwmon1/device/fan1_input
|
||||||
|
MINTEMP=hwmon1/device/pwm1=25
|
||||||
|
MAXTEMP=hwmon1/device/pwm1=65
|
||||||
|
MINSTART=hwmon1/device/pwm1=150
|
||||||
|
MINSTOP=hwmon1/device/pwm1=0
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nodes.machine =
|
# This configuration cannot be valid for the test VM, so it's expected to get an 'outdated' error.
|
||||||
{ ... }:
|
testScript = ''
|
||||||
{
|
start_all()
|
||||||
imports = [ ../modules/profiles/minimal.nix ];
|
# can't wait for unit fancontrol.service because it doesn't become active due to invalid config
|
||||||
hardware.fancontrol.enable = true;
|
# fancontrol.service is WantedBy multi-user.target
|
||||||
hardware.fancontrol.config = ''
|
machine.wait_for_unit("multi-user.target")
|
||||||
INTERVAL=42
|
machine.succeed(
|
||||||
DEVPATH=hwmon1=devices/platform/dummy
|
"journalctl -eu fancontrol | tee /dev/stderr | grep 'Configuration appears to be outdated'"
|
||||||
DEVNAME=hwmon1=dummy
|
)
|
||||||
FCTEMPS=hwmon1/device/pwm1=hwmon1/device/temp1_input
|
machine.shutdown()
|
||||||
FCFANS=hwmon1/device/pwm1=hwmon1/device/fan1_input
|
'';
|
||||||
MINTEMP=hwmon1/device/pwm1=25
|
}
|
||||||
MAXTEMP=hwmon1/device/pwm1=65
|
|
||||||
MINSTART=hwmon1/device/pwm1=150
|
|
||||||
MINSTOP=hwmon1/device/pwm1=0
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# This configuration cannot be valid for the test VM, so it's expected to get an 'outdated' error.
|
|
||||||
testScript = ''
|
|
||||||
start_all()
|
|
||||||
# can't wait for unit fancontrol.service because it doesn't become active due to invalid config
|
|
||||||
# fancontrol.service is WantedBy multi-user.target
|
|
||||||
machine.wait_for_unit("multi-user.target")
|
|
||||||
machine.succeed(
|
|
||||||
"journalctl -eu fancontrol | tee /dev/stderr | grep 'Configuration appears to be outdated'"
|
|
||||||
)
|
|
||||||
machine.shutdown()
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue