2020-04-24 23:36:52 +00:00
|
|
|
import ../make-test-python.nix {
|
2022-09-30 11:47:45 +00:00
|
|
|
name = "lorri";
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
nodes.machine = { pkgs, ... }: {
|
2020-04-24 23:36:52 +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 23:45:15 +00:00
|
|
|
machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr &")
|
2020-04-24 23:36:52 +00:00
|
|
|
machine.wait_until_succeeds("grep --fixed-strings 'ready' lorri.stdout")
|
|
|
|
|
|
|
|
# Ping the daemon
|
2020-07-18 16:06:22 +00:00
|
|
|
machine.succeed("lorri internal ping shell.nix")
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Wait for the daemon to finish the build
|
|
|
|
machine.wait_until_succeeds("grep --fixed-strings 'Completed' lorri.stdout")
|
|
|
|
'';
|
|
|
|
}
|