nixosTests.obs-studio: migrate to runTest

Part of #386873

Changed files
+32 -34
nixos
+1 -1
nixos/tests/all-tests.nix
···
nzbhydra2 = handleTest ./nzbhydra2.nix { };
ocis = handleTest ./ocis.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 { };
ollama = runTest ./ollama.nix;
ollama-cuda = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./ollama-cuda.nix;
+31 -33
nixos/tests/obs-studio.nix
···
-
import ./make-test-python.nix (
-
{ ... }:
+
{ ... }:
-
{
-
name = "obs-studio";
+
{
+
name = "obs-studio";
-
nodes.machine =
-
{ pkgs, ... }:
-
{
-
imports = [
-
./common/x11.nix
-
./common/user-account.nix
-
];
+
nodes.machine =
+
{ pkgs, ... }:
+
{
+
imports = [
+
./common/x11.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 = ''
-
machine.wait_for_x()
-
machine.succeed("obs --version")
+
testScript = ''
+
machine.wait_for_x()
+
machine.succeed("obs --version")
-
# virtual camera tests
-
machine.succeed("lsmod | grep v4l2loopback")
-
machine.succeed("ls /dev/video1")
-
machine.succeed("obs --startvirtualcam >&2 &")
-
machine.wait_for_window("OBS")
-
machine.sleep(5)
+
# virtual camera tests
+
machine.succeed("lsmod | grep v4l2loopback")
+
machine.succeed("ls /dev/video1")
+
machine.succeed("obs --startvirtualcam >&2 &")
+
machine.wait_for_window("OBS")
+
machine.sleep(5)
-
# test plugins
-
machine.succeed("which obs-vkcapture")
-
'';
-
}
-
)
+
# test plugins
+
machine.succeed("which obs-vkcapture")
+
'';
+
}