Skip to content

Commit

Permalink
tests: don't refer to TMPDIR
Browse files Browse the repository at this point in the history
  • Loading branch information
ncfavier committed Dec 6, 2022
1 parent b4b1338 commit 08dcd22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/check.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ with import ./config.nix;
};

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

Expand Down
6 changes: 3 additions & 3 deletions tests/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ nix-build check.nix -A fetchurl --no-out-link --check
nix-build check.nix -A fetchurl --no-out-link --repair
[[ $(cat $path) != foo ]]

echo 'Hello World' > $TMPDIR/dummy
echo 'Hello World' > $TEST_ROOT/dummy
nix-build check.nix -A hashmismatch --no-out-link || status=$?
[ "$status" = "102" ]

echo -n > $TMPDIR/dummy
echo -n > $TEST_ROOT/dummy
nix-build check.nix -A hashmismatch --no-out-link
echo 'Hello World' > $TMPDIR/dummy
echo 'Hello World' > $TEST_ROOT/dummy

nix-build check.nix -A hashmismatch --no-out-link --check || status=$?
[ "$status" = "102" ]
Expand Down

0 comments on commit 08dcd22

Please sign in to comment.