aboutsummaryrefslogtreecommitdiff
path: root/tests/ca/substitute.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-03-26 17:10:15 +0100
committerEelco Dolstra <edolstra@gmail.com>2021-03-26 17:10:15 +0100
commitdd77f71afe6733e9790dd001125c423cb648b7ce (patch)
tree13c7cafb2e0804c5251c458f63b59abe23104d6e /tests/ca/substitute.sh
parent4638bcfb2cfb74cb5029c0da0af38bb7ca4b4a6f (diff)
LocalBinaryCacheStore::upsertFile(): Fix race
When multiple threads try to upsert the same file, this could fail. Fixes #4667.
Diffstat (limited to 'tests/ca/substitute.sh')
-rw-r--r--tests/ca/substitute.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ca/substitute.sh b/tests/ca/substitute.sh
index 79a6ef8b1..b44fe499a 100644
--- a/tests/ca/substitute.sh
+++ b/tests/ca/substitute.sh
@@ -6,6 +6,8 @@ source common.sh
sed -i 's/experimental-features .*/& ca-derivations ca-references/' "$NIX_CONF_DIR"/nix.conf
+rm -rf $TEST_ROOT/binary_cache
+
export REMOTE_STORE=file://$TEST_ROOT/binary_cache
buildDrvs () {
@@ -13,6 +15,7 @@ buildDrvs () {
}
# Populate the remote cache
+clearStore
buildDrvs --post-build-hook ../push-to-store.sh
# Restart the build on an empty store, ensuring that we don't build