on e94de40 help sign in
23 lines 626 B history raw
1{ stdenv, writeScript }:
3with stdenv.lib;
5writeScript "check-materialization-concurrency.sh" ''
6 #!${stdenv.shell}
8 set -euo pipefail
10 WORK=$(mktemp -d)
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
22''