1 import ./make-test-python.nix ({ pkgs, ... }: {
2 name = "hddfancontrol";
3 meta = with pkgs.lib.maintainers; {
4 maintainers = [ benley ];
7 nodes.machine = { ... }: {
8 imports = [ ../modules/profiles/minimal.nix ];
10 services.hddfancontrol.enable = true;
11 services.hddfancontrol.disks = ["/dev/vda"];
12 services.hddfancontrol.pwmPaths = ["/test/hwmon1/pwm1"];
13 services.hddfancontrol.extraArgs = ["--pwm-start-value=32"
14 "--pwm-stop-value=0"];
16 systemd.services.hddfancontrol_fixtures = {
17 description = "Install test fixtures for hddfancontrol";
23 echo 255 > /test/hwmon1/pwm1
24 echo 2 > /test/hwmon1/pwm1_enable
26 wantedBy = ["hddfancontrol.service"];
27 before = ["hddfancontrol.service"];
30 systemd.services.hddfancontrol.serviceConfig.ReadWritePaths = "/test";
33 # hddfancontrol.service will fail to start because qemu /dev/vda doesn't have
34 # any thermal interfaces, but it should ensure that fans appear to be running
38 machine.wait_for_unit("multi-user.target")
39 machine.succeed("journalctl -eu hddfancontrol.service|grep 'Setting fan speed'")