nixosTests.auto-cpufreq: migrate to runTest

Part Of #386873
This commit is contained in:
Martin Weinelt 2025-03-13 23:50:05 +01:00
parent 56558f8c94
commit 48dda151d3
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 23 additions and 29 deletions

View file

@ -185,7 +185,7 @@ in {
audiobookshelf = runTest ./audiobookshelf.nix; audiobookshelf = runTest ./audiobookshelf.nix;
auth-mysql = runTest ./auth-mysql.nix; auth-mysql = runTest ./auth-mysql.nix;
authelia = runTest ./authelia.nix; authelia = runTest ./authelia.nix;
auto-cpufreq = handleTest ./auto-cpufreq.nix {}; auto-cpufreq = runTest ./auto-cpufreq.nix;
autobrr = handleTest ./autobrr.nix {}; autobrr = handleTest ./autobrr.nix {};
avahi = handleTest ./avahi.nix {}; avahi = handleTest ./avahi.nix {};
avahi-with-resolved = handleTest ./avahi.nix { networkd = true; }; avahi-with-resolved = handleTest ./avahi.nix { networkd = true; };

View file

@ -1,33 +1,27 @@
import ./make-test-python.nix ( {
{ pkgs, ... }: name = "auto-cpufreq-server";
{ nodes = {
name = "auto-cpufreq-server"; machine = {
# service will still start but since vm inside qemu cpufreq adjustments
nodes = { # cannot be made. This will resource in the following error but the service
machine = # remains up:
{ pkgs, ... }: # ERROR:
{ # Couldn't find any of the necessary scaling governors.
# service will still start but since vm inside qemu cpufreq adjustments services.auto-cpufreq = {
# cannot be made. This will resource in the following error but the service enable = true;
# remains up: settings = {
# ERROR: charger = {
# Couldn't find any of the necessary scaling governors. turbo = "auto";
services.auto-cpufreq = {
enable = true;
settings = {
charger = {
turbo = "auto";
};
};
}; };
}; };
};
}; };
};
testScript = '' testScript = ''
machine.start() machine.start()
machine.wait_for_unit("auto-cpufreq.service") machine.wait_for_unit("auto-cpufreq.service")
machine.succeed("auto-cpufreq --force reset") machine.succeed("auto-cpufreq --force reset")
''; '';
} }
)