1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/nixos/tests/lorri/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
813 B
Nix
Raw Normal View History

import ../make-test-python.nix {
2022-06-25 23:14:38 +01:00
name = "lorri";
2022-03-20 23:15:30 +00:00
nodes.machine =
{ pkgs, ... }:
{
imports = [ ../../modules/profiles/minimal.nix ];
environment.systemPackages = [ pkgs.lorri ];
};
testScript = ''
# Copy files over
machine.succeed(
"cp '${./fake-shell.nix}' shell.nix"
)
machine.succeed(
"cp '${./builder.sh}' builder.sh"
)
# Start the daemon and wait until it is ready
machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr &")
machine.wait_until_succeeds("grep --fixed-strings 'ready' lorri.stderr")
# Ping the daemon
machine.succeed("lorri internal ping --shell-file shell.nix")
# Wait for the daemon to finish the build
machine.wait_until_succeeds("grep --fixed-strings 'Completed' lorri.stderr")
'';
}