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:
Austin Horstman
2025-07-17 15:13:21 -05:00
parent e45ff5651c
commit 234f10ec6d

View File

@@ -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
);
};
}