nixos/tests/servo: init

This commit is contained in:
Martin Weinelt 2025-02-20 03:00:31 +01:00
parent f9cdf0eaae
commit f962ad853b
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
3 changed files with 36 additions and 1 deletions

View file

@ -953,6 +953,7 @@ in {
seatd = handleTest ./seatd.nix {};
send = runTest ./send.nix;
service-runner = handleTest ./service-runner.nix {};
servo = runTest ./servo.nix;
shadps4 = runTest ./shadps4.nix;
sftpgo = runTest ./sftpgo.nix;
sfxr-qt = handleTest ./sfxr-qt.nix {};

28
nixos/tests/servo.nix Normal file
View file

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

View file

@ -36,6 +36,9 @@
vulkan-loader,
wayland,
xorg,
# tests
nixosTests,
}:
let
@ -143,7 +146,10 @@ rustPlatform.buildRustPackage {
--prefix LD_LIBRARY_PATH : ${runtimePaths}
'';
passthru.updateScript = ./update.sh;
passthru = {
updateScript = ./update.sh;
tests = { inherit (nixosTests) servo; };
};
meta = {
description = "The embeddable, independent, memory-safe, modular, parallel web rendering engine";