nixos: Add small VM test for lightdm.
Serves as a regression test for #7902. It's not yet referenced in release(-combined)?.nix because it will fail until the issue is resolved. Tested successfully against libgcrypt with libcap passed as null however. As for the test itself, I'm not quite sure whether checking for the time displayed by IceWM is a good idea, but we can still fix that if it turns out to be a problem. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
		
							parent
							
								
									5e5eaf0fba
								
							
						
					
					
						commit
						d22b6fb10f
					
				
							
								
								
									
										25
									
								
								nixos/tests/lightdm.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								nixos/tests/lightdm.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,25 @@
 | 
			
		||||
import ./make-test.nix {
 | 
			
		||||
  name = "lightdm";
 | 
			
		||||
 | 
			
		||||
  machine = { lib, ... }: {
 | 
			
		||||
    imports = [ ./common/user-account.nix ];
 | 
			
		||||
    services.xserver.enable = true;
 | 
			
		||||
    services.xserver.displayManager.lightdm.enable = true;
 | 
			
		||||
    services.xserver.windowManager.default = "icewm";
 | 
			
		||||
    services.xserver.windowManager.icewm.enable = true;
 | 
			
		||||
    services.xserver.desktopManager.default = "none";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  enableOCR = true;
 | 
			
		||||
 | 
			
		||||
  testScript = { nodes, ... }: let
 | 
			
		||||
    user = nodes.machine.config.users.extraUsers.alice;
 | 
			
		||||
  in ''
 | 
			
		||||
    startAll;
 | 
			
		||||
    $machine->waitForText(qr/${user.description}/);
 | 
			
		||||
    $machine->screenshot("lightdm");
 | 
			
		||||
    $machine->sendChars("${user.password}\n");
 | 
			
		||||
    $machine->waitForText(qr/^\d{2}(?::\d{2}){2} (?:AM|PM)$/m);
 | 
			
		||||
    $machine->screenshot("session");
 | 
			
		||||
  '';
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user