mirror of
https://github.com/Platonic-Systems/process-compose-flake.git
synced 2024-09-11 14:07:00 +03:00
test: add check only on Linux
This commit is contained in:
parent
bbc4d756d5
commit
9f5b1e6f22
@ -51,6 +51,9 @@ in
|
||||
The testScript will have access to `process_compose.wait` function that
|
||||
can be used to get the running process information, after waiting for
|
||||
the specified readiness status.
|
||||
|
||||
The check is added only on Linux, inasmuch as nixosTest is not available
|
||||
on Darwin.
|
||||
'';
|
||||
default = null;
|
||||
example = ''
|
||||
@ -63,7 +66,7 @@ in
|
||||
outputs.check = mkOption {
|
||||
type = types.nullOr types.package;
|
||||
default =
|
||||
if config.testScript == null then null else
|
||||
if (config.testScript == null || !pkgs.stdenv.isLinux) then null else
|
||||
pkgs.nixosTest {
|
||||
testScript = testLibrary + "\n" + config.testScript;
|
||||
name = "process-compose-${name}-test";
|
||||
|
6
test.sh
6
test.sh
@ -6,7 +6,5 @@ cd ./example
|
||||
# First, build the example.
|
||||
nix build -L --no-link --print-out-paths --override-input process-compose-flake ..
|
||||
|
||||
# When on NixOS, run the VM tests to test runtime behaviour
|
||||
if command -v nixos-rebuild &> /dev/null; then
|
||||
nix flake check -L --override-input process-compose-flake ..
|
||||
fi
|
||||
# On NixOS, run the VM tests to test runtime behaviour
|
||||
nix flake check -L --override-input process-compose-flake ..
|
||||
|
Loading…
Reference in New Issue
Block a user