nixosTests.nix-ld: migrate to runTest
				
					
				
			https://github.com/NixOS/nixpkgs/issues/386873
This commit is contained in:
		
							parent
							
								
									bdc70ea03c
								
							
						
					
					
						commit
						84137f5adb
					
				@ -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;
 | 
			
		||||
 | 
			
		||||
@ -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")
 | 
			
		||||
  '';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user