about summary refs log tree commit diff
path: root/lib/tests/nix-for-tests.nix
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-11-09 02:08:44 -0800
committerAdam Joseph <adam@westernsemico.com>2023-11-18 20:19:10 -0800
commit54c9a08aaf98d6d3fd94dc843003360077bee4cc (patch)
tree52df01c7e4ef2a6910e8491630ce46a05d6c753c /lib/tests/nix-for-tests.nix
parent18e76671a16cebf6bcf52d9196d25a5a9f8c9ad7 (diff)
downloadnixlib-54c9a08aaf98d6d3fd94dc843003360077bee4cc.tar
nixlib-54c9a08aaf98d6d3fd94dc843003360077bee4cc.tar.gz
nixlib-54c9a08aaf98d6d3fd94dc843003360077bee4cc.tar.bz2
nixlib-54c9a08aaf98d6d3fd94dc843003360077bee4cc.tar.lz
nixlib-54c9a08aaf98d6d3fd94dc843003360077bee4cc.tar.xz
nixlib-54c9a08aaf98d6d3fd94dc843003360077bee4cc.tar.zst
nixlib-54c9a08aaf98d6d3fd94dc843003360077bee4cc.zip
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.
Diffstat (limited to 'lib/tests/nix-for-tests.nix')
-rw-r--r--lib/tests/nix-for-tests.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/tests/nix-for-tests.nix b/lib/tests/nix-for-tests.nix
new file mode 100644
index 000000000000..69dedece3874
--- /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