Skip to content

Commit

Permalink
Revert "tests/check.sh: Fix a race"
Browse files Browse the repository at this point in the history
This reverts commit 0776aa1 because
it's causing a test failure: https://hydra.nixos.org/build/247889890
  • Loading branch information
edolstra committed Mar 7, 2024
1 parent b4d5aac commit 99f14d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/add.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/check.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ with import ./config.nix;
};

hashmismatch = import <nix/fetchurl.nix> {
url = "file://" + builtins.getEnv "TMPDIR" + "/dummy";
url = "file://" + toString ./dummy;
sha256 = "0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73";
};

Expand Down
4 changes: 2 additions & 2 deletions tests/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down

0 comments on commit 99f14d4

Please sign in to comment.