mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 01:19:32 +08:00
tests/flake: add buildbot output
Filters tests to specific platforms for buildbot. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
@@ -21,29 +21,16 @@
|
||||
{ nixpkgs, ... }:
|
||||
let
|
||||
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems (
|
||||
forCI = nixpkgs.lib.genAttrs [
|
||||
"aarch64-darwin"
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
tests =
|
||||
system:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
tests = import ./. { inherit pkgs; };
|
||||
in
|
||||
tests.run
|
||||
);
|
||||
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
lib = pkgs.lib;
|
||||
|
||||
testPackages =
|
||||
let
|
||||
tests = import ./. { inherit pkgs; };
|
||||
renameTestPkg = n: lib.nameValuePair "test-${n}";
|
||||
in
|
||||
lib.mapAttrs' renameTestPkg tests.build;
|
||||
|
||||
integrationTestPackages =
|
||||
let
|
||||
@@ -108,13 +95,42 @@
|
||||
) numChunks
|
||||
);
|
||||
in
|
||||
testPackages
|
||||
// integrationTestPackages
|
||||
integrationTestPackages
|
||||
// testChunks
|
||||
// (lib.listToAttrs [
|
||||
testAllNoBig
|
||||
testAllNoBigIfd
|
||||
])
|
||||
]);
|
||||
|
||||
in
|
||||
{
|
||||
buildbot = forCI (system: tests system);
|
||||
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
tests = import ./. { inherit pkgs; };
|
||||
in
|
||||
tests.run
|
||||
);
|
||||
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
# testPackages: only included in packages
|
||||
testPackages =
|
||||
let
|
||||
tests = import ./. { inherit pkgs; };
|
||||
renameTestPkg = n: lib.nameValuePair "test-${n}";
|
||||
in
|
||||
lib.mapAttrs' renameTestPkg tests.build;
|
||||
|
||||
in
|
||||
testPackages // tests system
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user