mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
8707773965
Make sure that we can’t build the same derivation twice at the same time. Fix https://github.com/NixOS/nix/issues/5029
18 lines
389 B
Bash
Executable file
18 lines
389 B
Bash
Executable file
#!/usr/bin/env bash
|
||
|
||
# Ensure that we can’t build twice the same derivation concurrently.
|
||
# Regression test for https://github.com/NixOS/nix/issues/5029
|
||
|
||
source common.sh
|
||
|
||
sed -i 's/experimental-features .*/& ca-derivations ca-references/' "$NIX_CONF_DIR"/nix.conf
|
||
|
||
export NIX_TESTS_CA_BY_DEFAULT=1
|
||
|
||
clearStore
|
||
|
||
for i in {0..5}; do
|
||
nix build --no-link --file ./racy.nix &
|
||
done
|
||
|
||
wait
|