nixosTests.nix-ld: migrate to runTest

https://github.com/NixOS/nixpkgs/issues/386873
This commit is contained in:
João Nogueira 2025-04-17 02:02:34 +02:00
parent bdc70ea03c
commit 84137f5adb
No known key found for this signature in database
GPG key ID: 6F547B6BD44BC484
2 changed files with 11 additions and 18 deletions

View file

@ -914,7 +914,7 @@ in
nifi = runTestOn [ "x86_64-linux" ] ./web-apps/nifi.nix;
nitter = handleTest ./nitter.nix { };
nix-config = handleTest ./nix-config.nix { };
nix-ld = handleTest ./nix-ld.nix { };
nix-ld = runTest ./nix-ld.nix;
nix-misc = handleTest ./nix/misc.nix { };
nix-upgrade = handleTest ./nix/upgrade.nix { inherit (pkgs) nixVersions; };
nix-required-mounts = runTest ./nix-required-mounts;

View file

@ -1,14 +1,12 @@
{ ... }:
{
system ? builtins.currentSystem,
config ? { },
pkgs ? import ../.. { inherit system config; },
}:
let
inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest;
shared =
name = "nix-ld";
nodes.machine =
{ config, pkgs, ... }:
{
programs.nix-ld.enable = true;
environment.systemPackages = [
(pkgs.runCommand "patched-hello" { } ''
install -D -m755 ${pkgs.hello}/bin/hello $out/bin/hello
@ -16,14 +14,9 @@ let
'')
];
};
in
{
nix-ld = makeTest {
name = "nix-ld";
nodes.machine = shared;
testScript = ''
start_all()
machine.succeed("hello")
'';
};
testScript = ''
start_all()
machine.succeed("hello")
'';
}