diff options
author | Silvan Mosberger <github@infinisil.com> | 2023-11-19 06:17:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-19 06:17:18 +0100 |
commit | ff562fa5fc91523e2222ee5dc4600162a775eddb (patch) | |
tree | 429a837d65ad29cf57c10a79150a208915d78ceb | |
parent | 5b96ca80990d78ae2294b7ad7276f286f64b83c3 (diff) | |
parent | 54c9a08aaf98d6d3fd94dc843003360077bee4cc (diff) | |
download | nixpkgs-ff562fa5fc91523e2222ee5dc4600162a775eddb.tar nixpkgs-ff562fa5fc91523e2222ee5dc4600162a775eddb.tar.gz nixpkgs-ff562fa5fc91523e2222ee5dc4600162a775eddb.tar.bz2 nixpkgs-ff562fa5fc91523e2222ee5dc4600162a775eddb.tar.lz nixpkgs-ff562fa5fc91523e2222ee5dc4600162a775eddb.tar.xz nixpkgs-ff562fa5fc91523e2222ee5dc4600162a775eddb.tar.zst nixpkgs-ff562fa5fc91523e2222ee5dc4600162a775eddb.zip |
Merge pull request #266443 from amjoseph-nixpkgs/pr/lib-tests-no-aws-sdk
-rw-r--r-- | lib/path/tests/default.nix | 9 | ||||
-rw-r--r-- | lib/tests/nix-for-tests.nix | 17 | ||||
-rw-r--r-- | lib/tests/release.nix | 5 |
3 files changed, 26 insertions, 5 deletions
diff --git a/lib/path/tests/default.nix b/lib/path/tests/default.nix index 50d40cdfa47..93aea798acc 100644 --- a/lib/path/tests/default.nix +++ b/lib/path/tests/default.nix @@ -6,16 +6,19 @@ overlays = []; inherit system; }, + nixVersions ? import ../../tests/nix-for-tests.nix { inherit pkgs; }, libpath ? ../.., # Random seed seed ? null, }: + pkgs.runCommand "lib-path-tests" { - nativeBuildInputs = with pkgs; [ - nix + nativeBuildInputs = [ + nixVersions.stable + ] ++ (with pkgs; [ jq bc - ]; + ]); } '' # Needed to make Nix evaluation work export TEST_ROOT=$(pwd)/test-tmp diff --git a/lib/tests/nix-for-tests.nix b/lib/tests/nix-for-tests.nix new file mode 100644 index 00000000000..69dedece387 --- /dev/null +++ b/lib/tests/nix-for-tests.nix @@ -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 diff --git a/lib/tests/release.nix b/lib/tests/release.nix index 6e5b0711736..843180490bb 100644 --- a/lib/tests/release.nix +++ b/lib/tests/release.nix @@ -1,8 +1,9 @@ { # The pkgs used for dependencies for the testing itself # 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!"; }, - nix ? pkgs.nix, - nixVersions ? [ pkgs.nixVersions.minimum nix pkgs.nixVersions.unstable ], + nix ? pkgs-nixVersions.stable, + nixVersions ? [ pkgs-nixVersions.minimum nix pkgs-nixVersions.unstable ], + pkgs-nixVersions ? import ./nix-for-tests.nix { inherit pkgs; }, }: let |