nixosTests.obs-studio: migrate to runTest

Part of #386873
This commit is contained in:
Piotr Kwiecinski 2025-04-16 14:12:28 +02:00
parent d3f5b059bb
commit 0492f44ab9
No known key found for this signature in database
GPG key ID: EC0DE1CB9D5258B4
2 changed files with 32 additions and 34 deletions

View file

@ -965,7 +965,7 @@ in
nzbhydra2 = handleTest ./nzbhydra2.nix { }; nzbhydra2 = handleTest ./nzbhydra2.nix { };
ocis = handleTest ./ocis.nix { }; ocis = handleTest ./ocis.nix { };
oddjobd = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./oddjobd.nix { }; oddjobd = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./oddjobd.nix { };
obs-studio = handleTest ./obs-studio.nix { }; obs-studio = runTest ./obs-studio.nix;
oh-my-zsh = handleTest ./oh-my-zsh.nix { }; oh-my-zsh = handleTest ./oh-my-zsh.nix { };
ollama = runTest ./ollama.nix; ollama = runTest ./ollama.nix;
ollama-cuda = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./ollama-cuda.nix; ollama-cuda = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./ollama-cuda.nix;

View file

@ -1,40 +1,38 @@
import ./make-test-python.nix ( { ... }:
{ ... }:
{ {
name = "obs-studio"; name = "obs-studio";
nodes.machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports = [
./common/x11.nix ./common/x11.nix
./common/user-account.nix ./common/user-account.nix
];
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-vkcapture
]; ];
enableVirtualCamera = true;
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-vkcapture
];
enableVirtualCamera = true;
};
}; };
};
testScript = '' testScript = ''
machine.wait_for_x() machine.wait_for_x()
machine.succeed("obs --version") machine.succeed("obs --version")
# virtual camera tests # virtual camera tests
machine.succeed("lsmod | grep v4l2loopback") machine.succeed("lsmod | grep v4l2loopback")
machine.succeed("ls /dev/video1") machine.succeed("ls /dev/video1")
machine.succeed("obs --startvirtualcam >&2 &") machine.succeed("obs --startvirtualcam >&2 &")
machine.wait_for_window("OBS") machine.wait_for_window("OBS")
machine.sleep(5) machine.sleep(5)
# test plugins # test plugins
machine.succeed("which obs-vkcapture") machine.succeed("which obs-vkcapture")
''; '';
} }
)