1import ../make-test-python.nix {
2 name = "lorri";
3
4 nodes.machine = { pkgs, ... }: {
5 imports = [ ../../modules/profiles/minimal.nix ];
6 environment.systemPackages = [ pkgs.lorri ];
7 };
8
9 testScript = ''
10 # Copy files over
11 machine.succeed(
12 "cp '${./fake-shell.nix}' shell.nix"
13 )
14 machine.succeed(
15 "cp '${./builder.sh}' builder.sh"
16 )
17
18 # Start the daemon and wait until it is ready
19 machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr &")
20 machine.wait_until_succeeds("grep --fixed-strings 'ready' lorri.stdout")
21
22 # Ping the daemon
23 machine.succeed("lorri internal ping shell.nix")
24
25 # Wait for the daemon to finish the build
26 machine.wait_until_succeeds("grep --fixed-strings 'Completed' lorri.stdout")
27 '';
28}