2019-11-05 11:57:05 +01:00
|
|
|
import ../make-test-python.nix {
|
|
|
|
machine = { pkgs, ... }: {
|
|
|
|
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
|
2021-11-05 01:43:22 +01:00
|
|
|
machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr >&2 &")
|
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
|
|
|
'';
|
|
|
|
}
|