2019-11-05 10:57:05 +00:00
|
|
|
import ../make-test-python.nix {
|
2022-06-25 22:14:38 +00: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 &")
|
2020-02-05 18:27:16 +00:00
|
|
|
machine.wait_until_succeeds("grep --fixed-strings 'ready' lorri.stdout")
|
2019-11-05 10:57:05 +00:00
|
|
|
|
|
|
|
# Ping the daemon
|
2020-06-30 00:09:13 +00:00
|
|
|
machine.succeed("lorri internal ping shell.nix")
|
2019-11-05 10:57:05 +00:00
|
|
|
|
|
|
|
# Wait for the daemon to finish the build
|
2020-02-05 18:27:16 +00:00
|
|
|
machine.wait_until_succeeds("grep --fixed-strings 'Completed' lorri.stdout")
|
2019-11-05 10:57:05 +00:00
|
|
|
'';
|
|
|
|
}
|