2019-11-05 10:57:05 +00:00
|
|
|
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, ... }:
|
|
|
|
{
|
2019-11-05 10:57:05 +00:00
|
|
|
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
|
2022-01-19 10:22:23 +00:00
|
|
|
machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr &")
|
2024-07-07 10:16:23 +01:00
|
|
|
machine.wait_until_succeeds("grep --fixed-strings 'ready' lorri.stderr")
|
2019-11-05 10:57:05 +00:00
|
|
|
|
|
|
|
# Ping the daemon
|
2024-07-07 10:16:23 +01:00
|
|
|
machine.succeed("lorri internal ping --shell-file shell.nix")
|
2019-11-05 10:57:05 +00:00
|
|
|
|
|
|
|
# Wait for the daemon to finish the build
|
2024-07-07 10:16:23 +01:00
|
|
|
machine.wait_until_succeeds("grep --fixed-strings 'Completed' lorri.stderr")
|
2019-11-05 10:57:05 +00:00
|
|
|
'';
|
|
|
|
}
|