From 99f14d4b34470d7a216e0a89d44c4ce764410503 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 7 Mar 2024 14:27:23 +0100 Subject: [PATCH] Revert "tests/check.sh: Fix a race" This reverts commit 0776aa11c9e5864e8666dc9dfa670b55e9d6764f because it's causing a test failure: https://hydra.nixos.org/build/247889890 --- tests/add.sh | 2 +- tests/check.nix | 2 +- tests/check.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/add.sh b/tests/add.sh index 5c3eed7931a..e26e05843d7 100644 --- a/tests/add.sh +++ b/tests/add.sh @@ -9,7 +9,7 @@ echo $path2 if test "$path1" != "$path2"; then echo "nix-store --add and --add-fixed mismatch" exit 1 -fi +fi path3=$(nix-store --add-fixed sha256 ./dummy) echo $path3 diff --git a/tests/check.nix b/tests/check.nix index 32f0f9733a6..56c82e565a8 100644 --- a/tests/check.nix +++ b/tests/check.nix @@ -11,7 +11,7 @@ with import ./config.nix; }; hashmismatch = import { - url = "file://" + builtins.getEnv "TMPDIR" + "/dummy"; + url = "file://" + toString ./dummy; sha256 = "0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73"; }; diff --git a/tests/check.sh b/tests/check.sh index 45d29fd99a7..bc23a6634ca 100644 --- a/tests/check.sh +++ b/tests/check.sh @@ -34,9 +34,9 @@ nix-build check.nix -A fetchurl --no-out-link --repair --hashed-mirrors '' nix-build check.nix -A hashmismatch --no-out-link --hashed-mirrors '' || status=$? [ "$status" = "102" ] -echo -n > $TMPDIR/dummy +echo -n > ./dummy nix-build check.nix -A hashmismatch --no-out-link --hashed-mirrors '' -echo 'Hello World' > $TMPDIR/dummy +echo 'Hello World' > ./dummy nix-build check.nix -A hashmismatch --no-out-link --check --hashed-mirrors '' || status=$? [ "$status" = "102" ]