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