nixos/tests/oku: init (#425960)

This commit is contained in:
Paul Haerle 2025-07-28 10:15:18 +02:00 committed by GitHub
commit b02ff16421
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 33 additions and 1 deletions

View File

@ -699,6 +699,7 @@ in
imports = [ ./odoo.nix ];
_module.args.package = pkgs.odoo16;
};
oku = runTest ./oku.nix;
oncall = runTest ./web-apps/oncall.nix;
# 9pnet_virtio used to mount /nix partition doesn't support
# hibernation. This test happens to work on x86_64-linux but

27
nixos/tests/oku.nix Normal file
View File

@ -0,0 +1,27 @@
{
lib,
pkgs,
...
}:
{
name = "oku";
meta.maintainers = with lib.maintainers; [ ethancedwards8 ];
nodes.machine = {
imports = [ ./common/x11.nix ];
environment.systemPackages = with pkgs; [ oku ];
};
enableOCR = true;
testScript = ''
machine.wait_for_x()
with subtest("Wait until Oku has finished loading the Valgrind docs page"):
machine.execute("xterm -e 'oku -n file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' >&2 &");
machine.wait_for_window("oku")
'';
}

View File

@ -12,6 +12,7 @@
pango,
webkitgtk_6_0,
nix-update-script,
nixosTests,
}:
rustPlatform.buildRustPackage (finalAttrs: {
@ -55,7 +56,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
cp -r ${finalAttrs.src}/data/hicolor $out/share/icons
'';
passthru.updateScript = nix-update-script { };
passthru = {
updateScript = nix-update-script { };
tests = { inherit (nixosTests) oku; };
};
meta = {
description = "Browser for the Oku Network and Peer-to-peer sites";