python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / nixos / tests / fancontrol.nix
blobecb936097446340fa9f15a3637b1803dce93bc0b
1 import ./make-test-python.nix ({ pkgs, ... } : {
2   name = "fancontrol";
3   meta = with pkgs.lib.maintainers; {
4     maintainers = [ evils ];
5   };
7   nodes.machine = { ... }: {
8     imports = [ ../modules/profiles/minimal.nix ];
9     hardware.fancontrol.enable = true;
10     hardware.fancontrol.config = ''
11       INTERVAL=42
12       DEVPATH=hwmon1=devices/platform/dummy
13       DEVNAME=hwmon1=dummy
14       FCTEMPS=hwmon1/device/pwm1=hwmon1/device/temp1_input
15       FCFANS=hwmon1/device/pwm1=hwmon1/device/fan1_input
16       MINTEMP=hwmon1/device/pwm1=25
17       MAXTEMP=hwmon1/device/pwm1=65
18       MINSTART=hwmon1/device/pwm1=150
19       MINSTOP=hwmon1/device/pwm1=0
20     '';
21     };
23   # This configuration cannot be valid for the test VM, so it's expected to get an 'outdated' error.
24   testScript = ''
25     start_all()
26     # can't wait for unit fancontrol.service because it doesn't become active due to invalid config
27     # fancontrol.service is WantedBy multi-user.target
28     machine.wait_for_unit("multi-user.target")
29     machine.succeed(
30         "journalctl -eu fancontrol | tee /dev/stderr | grep 'Configuration appears to be outdated'"
31     )
32     machine.shutdown()
33   '';