nixos/auto-cpufreq: init vm test
Even though cpufreq cannot be adjusted within qemu this test is still useful to ensure that the service is running and the auto-cpufreq cli is able to interact with the auto-cpufreq service.
This commit is contained in:
@@ -141,6 +141,7 @@ in {
|
|||||||
audiobookshelf = handleTest ./audiobookshelf.nix {};
|
audiobookshelf = handleTest ./audiobookshelf.nix {};
|
||||||
auth-mysql = handleTest ./auth-mysql.nix {};
|
auth-mysql = handleTest ./auth-mysql.nix {};
|
||||||
authelia = handleTest ./authelia.nix {};
|
authelia = handleTest ./authelia.nix {};
|
||||||
|
auto-cpufreq = handleTest ./auto-cpufreq.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; };
|
||||||
ayatana-indicators = runTest ./ayatana-indicators.nix;
|
ayatana-indicators = runTest ./ayatana-indicators.nix;
|
||||||
|
|||||||
33
nixos/tests/auto-cpufreq.nix
Normal file
33
nixos/tests/auto-cpufreq.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import ./make-test-python.nix (
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
machine.start()
|
||||||
|
machine.wait_for_unit("auto-cpufreq.service")
|
||||||
|
machine.succeed("auto-cpufreq --force reset")
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user