@@ -0,0 +1,23 @@
1+{ stdenv, writeScript }:
5+writeScript "check-materialization-concurrency.sh" ''
12+ # We expect to see both the hello and world derivations to start building
13+ # before either of them finish.
14+ echo EVENT start hello > $WORK/expected.txt
15+ echo EVENT start world >> $WORK/expected.txt
16+ echo EVENT end hello >> $WORK/expected.txt
17+ echo EVENT end world >> $WORK/expected.txt
19+ nix-build -j2 scripts/check-materialization-concurrency --arg n "\"$(date)\"" 2>&1 | grep '^EVENT' > $WORK/actual.txt
21+ diff -u $WORK/expected.txt $WORK/actual.txt