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;
auth-mysql = runTest ./auth-mysql.nix;
authelia = runTest ./authelia.nix;
auto-cpufreq = handleTest ./auto-cpufreq.nix {};
auto-cpufreq = runTest ./auto-cpufreq.nix;
autobrr = handleTest ./autobrr.nix {};
avahi = handleTest ./avahi.nix {};
avahi-with-resolved = handleTest ./avahi.nix { networkd = true; };

View file

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