2019-11-05 11:57:05 +01:00
|
|
|
import ../make-test-python.nix {
|
2022-06-26 00:14:38 +02:00
|
|
|
name = "lorri";
|
|
|
|
|
2022-03-21 00:15:30 +01:00
|
|
|
nodes.machine = { pkgs, ... }: {
|
2019-11-05 11:57:05 +01: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 11:22:23 +01:00
|
|
|
machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr &")
|
2020-02-05 19:27:16 +01:00
|
|
|
machine.wait_until_succeeds("grep --fixed-strings 'ready' lorri.stdout")
|
2019-11-05 11:57:05 +01:00
|
|
|
|
|
|
|
# Ping the daemon
|
2020-06-30 02:09:13 +02:00
|
|
|
machine.succeed("lorri internal ping shell.nix")
|
2019-11-05 11:57:05 +01:00
|
|
|
|
|
|
|
# Wait for the daemon to finish the build
|
2020-02-05 19:27:16 +01:00
|
|
|
machine.wait_until_succeeds("grep --fixed-strings 'Completed' lorri.stdout")
|
2019-11-05 11:57:05 +01:00
|
|
|
'';
|
|
|
|
}
|