mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
lib.tests: build nix without flaky aws-sdk-cpp
The aws-sdk-cpp tests are flaky. Since pull requests to staging cause nix to be rebuilt, this means that staging PRs end up getting false CI failures due to whatever is flaky in the AWS SDK tests. Since none of our CI needs to (or should be able to) contact AWS S3, let's just omit it all. Bonus: the tests build way faster.
This commit is contained in:
parent
18e76671a1
commit
54c9a08aaf
@ -6,16 +6,19 @@
|
|||||||
overlays = [];
|
overlays = [];
|
||||||
inherit system;
|
inherit system;
|
||||||
},
|
},
|
||||||
|
nixVersions ? import ../../tests/nix-for-tests.nix { inherit pkgs; },
|
||||||
libpath ? ../..,
|
libpath ? ../..,
|
||||||
# Random seed
|
# Random seed
|
||||||
seed ? null,
|
seed ? null,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
pkgs.runCommand "lib-path-tests" {
|
pkgs.runCommand "lib-path-tests" {
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = [
|
||||||
nix
|
nixVersions.stable
|
||||||
|
] ++ (with pkgs; [
|
||||||
jq
|
jq
|
||||||
bc
|
bc
|
||||||
];
|
]);
|
||||||
} ''
|
} ''
|
||||||
# Needed to make Nix evaluation work
|
# Needed to make Nix evaluation work
|
||||||
export TEST_ROOT=$(pwd)/test-tmp
|
export TEST_ROOT=$(pwd)/test-tmp
|
||||||
|
17
lib/tests/nix-for-tests.nix
Normal file
17
lib/tests/nix-for-tests.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ pkgs
|
||||||
|
}:
|
||||||
|
|
||||||
|
# The aws-sdk-cpp tests are flaky. Since pull requests to staging
|
||||||
|
# cause nix to be rebuilt, this means that staging PRs end up
|
||||||
|
# getting false CI failures due to whatever is flaky in the AWS
|
||||||
|
# SDK tests. Since none of our CI needs to (or should be able to)
|
||||||
|
# contact AWS S3, let's just omit it all from the Nix that runs
|
||||||
|
# CI. Bonus: the tests build way faster.
|
||||||
|
#
|
||||||
|
# See also: https://github.com/NixOS/nix/issues/7582
|
||||||
|
|
||||||
|
builtins.mapAttrs (_: pkg:
|
||||||
|
if builtins.isAttrs pkg
|
||||||
|
then pkg.override { withAWS = false; }
|
||||||
|
else pkg)
|
||||||
|
pkgs.nixVersions
|
@ -1,8 +1,9 @@
|
|||||||
{ # The pkgs used for dependencies for the testing itself
|
{ # The pkgs used for dependencies for the testing itself
|
||||||
# Don't test properties of pkgs.lib, but rather the lib in the parent directory
|
# Don't test properties of pkgs.lib, but rather the lib in the parent directory
|
||||||
pkgs ? import ../.. {} // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; },
|
pkgs ? import ../.. {} // { lib = throw "pkgs.lib accessed, but the lib tests should use nixpkgs' lib path directly!"; },
|
||||||
nix ? pkgs.nix,
|
nix ? pkgs-nixVersions.stable,
|
||||||
nixVersions ? [ pkgs.nixVersions.minimum nix pkgs.nixVersions.unstable ],
|
nixVersions ? [ pkgs-nixVersions.minimum nix pkgs-nixVersions.unstable ],
|
||||||
|
pkgs-nixVersions ? import ./nix-for-tests.nix { inherit pkgs; },
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
Loading…
Reference in New Issue
Block a user