Skip to content

Commit

Permalink
nix: add installer test and adapt passthru tests based on the platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Sep 22, 2024
1 parent e36ab64 commit 30f11e4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions pkgs/tools/package-management/nix/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,6 @@ self = stdenv.mkDerivation {
perl-bindings = perl.pkgs.toPerlModule (callPackage ./nix-perl.nix { nix = self; inherit Security; });

tests = {
nixi686 = pkgsi686Linux.nixVersions.${self_attribute_name};
nixStatic = pkgsStatic.nixVersions.${self_attribute_name};

# Basic smoke test that needs to pass when upgrading nix.
# Note that this test does only test the nixVersions.stable attribute.
misc = nixosTests.nix-misc.default;
upgrade = nixosTests.nix-upgrade;

srcVersion = runCommand "nix-src-version" {
inherit version;
} ''
Expand All @@ -291,6 +283,16 @@ self = stdenv.mkDerivation {
inherit lib pkgs;
nix = self;
};
} // lib.optionalAttrs stdenv.isLinux {
nixStatic = pkgsStatic.nixVersions.${self_attribute_name};

# Basic smoke tests that needs to pass when upgrading nix.
# Note that this test does only test the nixVersions.stable attribute.
misc = nixosTests.nix-misc.default;
upgrade = nixosTests.nix-upgrade;
simpleUefiSystemdBoot = nixosTests.installer.simpleUefiSystemdBoot;
} // lib.optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") {
nixi686 = pkgsi686Linux.nixVersions.${self_attribute_name};
};
};

Expand Down

0 comments on commit 30f11e4

Please sign in to comment.