about summary refs log tree commit diff
path: root/pkgs/test
diff options
context:
space:
mode:
authorSilvan Mosberger <silvan.mosberger@tweag.io>2023-09-23 00:09:26 +0200
committerSilvan Mosberger <silvan.mosberger@tweag.io>2023-09-23 00:09:26 +0200
commit1fe58cb05088030f4350662f5f04fe4bf3940656 (patch)
treee51fc84d3853bfab5bb7d5b3a6eecec262475f33 /pkgs/test
parent5176fa7d0ca390e06caaf6f0145b8cfb6431d744 (diff)
downloadnixlib-1fe58cb05088030f4350662f5f04fe4bf3940656.tar
nixlib-1fe58cb05088030f4350662f5f04fe4bf3940656.tar.gz
nixlib-1fe58cb05088030f4350662f5f04fe4bf3940656.tar.bz2
nixlib-1fe58cb05088030f4350662f5f04fe4bf3940656.tar.lz
nixlib-1fe58cb05088030f4350662f5f04fe4bf3940656.tar.xz
nixlib-1fe58cb05088030f4350662f5f04fe4bf3940656.tar.zst
nixlib-1fe58cb05088030f4350662f5f04fe4bf3940656.zip
tests.nixpkgs-check-by-name: Fix non-reproducible test failures
This was an oversight in https://github.com/NixOS/nixpkgs/pull/254435
Diffstat (limited to 'pkgs/test')
-rw-r--r--pkgs/test/nixpkgs-check-by-name/default.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/test/nixpkgs-check-by-name/default.nix b/pkgs/test/nixpkgs-check-by-name/default.nix
index cb8a672bc990..f69a134f568f 100644
--- a/pkgs/test/nixpkgs-check-by-name/default.nix
+++ b/pkgs/test/nixpkgs-check-by-name/default.nix
@@ -26,10 +26,13 @@ let
         export NIX_STATE_DIR=$TEST_ROOT/var/nix
         export NIX_STORE_DIR=$TEST_ROOT/store
 
-        # cargo tests run in parallel by default, which would then run into
-        # https://github.com/NixOS/nix/issues/2706 unless the store is initialised first
+        # Ensure that even if tests run in parallel, we don't get an error
+        # We'd run into https://github.com/NixOS/nix/issues/2706 unless the store is initialised first
         nix-store --init
       '';
+      # The tests use the shared environment variables,
+      # so we cannot run them in parallel
+      dontUseCargoParallelTests = true;
       postCheck = ''
         cargo fmt --check
         cargo clippy -- -D warnings