2019-11-05 10:57:05 +00: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 00:43:22 +00:00
|
|
|
machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr >&2 &")
|
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 01:09:13 +01: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
|
|
|
'';
|
|
|
|
}
|