diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 9bce49c9e30..20736d030e8 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -183,6 +183,7 @@ in # openstack-image-userdata doesn't work in a sandbox as the simulated openstack instance needs network access #openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {}; openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata or {}; + os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {}; osquery = handleTest ./osquery.nix {}; osrm-backend = handleTest ./osrm-backend.nix {}; ostree = handleTest ./ostree.nix {}; diff --git a/nixos/tests/os-prober.nix b/nixos/tests/os-prober.nix index 29a6fa7676c..d166bfc8113 100644 --- a/nixos/tests/os-prober.nix +++ b/nixos/tests/os-prober.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({pkgs, lib}: +import ./make-test.nix ({pkgs, lib, ...}: let # A filesystem image with a (presumably) bootable debian debianImage = pkgs.vmTools.diskImageFuns.debian9i386 { diff --git a/pkgs/tools/misc/os-prober/default.nix b/pkgs/tools/misc/os-prober/default.nix index 21c434bb5a3..d68ed9c5cd3 100644 --- a/pkgs/tools/misc/os-prober/default.nix +++ b/pkgs/tools/misc/os-prober/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitLab, makeWrapper, +{ stdenv, fetchFromGitLab, makeWrapper, nixosTests, # optional dependencies, the command(s) they provide coreutils, # mktemp grub2, # grub-mount and grub-probe @@ -59,6 +59,9 @@ stdenv.mkDerivation rec { done; ''; + passthru.tests = { + os-prober = nixosTests.os-prober; + }; meta = with stdenv.lib; { description = "Utility to detect other OSs on a set of drives"; homepage = http://packages.debian.org/source/sid/os-prober;