diff options
author | Leonhard Markert <curiousleo@users.noreply.github.com> | 2019-11-05 11:57:05 +0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2019-11-14 16:06:27 +0100 |
commit | ceccff3439fdbb11ac2025bdd4578970f3c49e28 (patch) | |
tree | 0e5fe35a85d20d0e64e61cac49056fb84471f1df /nixos | |
parent | 7b77666eb1e4ba5731c84551f50a7e55c3d8095f (diff) | |
download | nixlib-ceccff3439fdbb11ac2025bdd4578970f3c49e28.tar nixlib-ceccff3439fdbb11ac2025bdd4578970f3c49e28.tar.gz nixlib-ceccff3439fdbb11ac2025bdd4578970f3c49e28.tar.bz2 nixlib-ceccff3439fdbb11ac2025bdd4578970f3c49e28.tar.lz nixlib-ceccff3439fdbb11ac2025bdd4578970f3c49e28.tar.xz nixlib-ceccff3439fdbb11ac2025bdd4578970f3c49e28.tar.zst nixlib-ceccff3439fdbb11ac2025bdd4578970f3c49e28.zip |
lorri: init at version unstable-2019-10-30
Includes user service (nixos/modules/services/development/lorri) that starts on demand.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/lorri/builder.sh | 3 | ||||
-rw-r--r-- | nixos/tests/lorri/default.nix | 26 | ||||
-rw-r--r-- | nixos/tests/lorri/fake-shell.nix | 5 |
4 files changed, 35 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8ba10bdc4f40..b285f817d964 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -147,6 +147,7 @@ in login = handleTest ./login.nix {}; loki = handleTest ./loki.nix {}; #logstash = handleTest ./logstash.nix {}; + lorri = handleTest ./lorri/default.nix {}; mailcatcher = handleTest ./mailcatcher.nix {}; mathics = handleTest ./mathics.nix {}; matomo = handleTest ./matomo.nix {}; diff --git a/nixos/tests/lorri/builder.sh b/nixos/tests/lorri/builder.sh new file mode 100644 index 000000000000..b586b2bf7985 --- /dev/null +++ b/nixos/tests/lorri/builder.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +printf "%s" "${name:?}" > "${out:?}" diff --git a/nixos/tests/lorri/default.nix b/nixos/tests/lorri/default.nix new file mode 100644 index 000000000000..53074385a652 --- /dev/null +++ b/nixos/tests/lorri/default.nix @@ -0,0 +1,26 @@ +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 + machine.execute("lorri daemon > lorri.stdout 2> lorri.stderr &") + machine.wait_until_succeeds("grep --fixed-strings 'lorri: ready' lorri.stdout") + + # Ping the daemon + machine.execute("lorri ping_ $(readlink -f shell.nix)") + + # Wait for the daemon to finish the build + machine.wait_until_succeeds("grep --fixed-strings 'OutputPaths' lorri.stdout") + ''; +} diff --git a/nixos/tests/lorri/fake-shell.nix b/nixos/tests/lorri/fake-shell.nix new file mode 100644 index 000000000000..9de9d247e542 --- /dev/null +++ b/nixos/tests/lorri/fake-shell.nix @@ -0,0 +1,5 @@ +derivation { + system = builtins.currentSystem; + name = "fake-shell"; + builder = ./builder.sh; +} |