guix/tests/parallel.sh
Eelco Dolstra c8d3882cdc * True parallel builds. Nix can now run as many build jobs in
parallel as possible (similar to GNU Make's `-j' switch).  This is
  useful on SMP systems, but it is especially useful for doing builds
  on multiple machines.  The idea is that a large derivation is
  initiated on one master machine, which then distributes
  sub-derivations to any number of slave machines.  This should not
  happen synchronously or in lock-step, so the master must be capable
  of dealing with multiple parallel build jobs.  We now have the
  infrastructure to support this.

  TODO: substitutes are currently broken.
2004-05-11 18:05:44 +00:00

21 lines
490 B
Bash

storeExpr=$($TOP/src/nix-instantiate/nix-instantiate parallel.nix)
echo "store expr is $storeExpr"
#for i in $(seq 1 5); do
# echo "WORKER $i"
# $TOP/src/nix-store/nix-store -rvvB "$storeExpr" &
#done
#sleep 5
outPath=$($TOP/src/nix-store/nix-store -qnfvvvvvvK "$storeExpr")
echo "output path is $outPath"
text=$(cat "$outPath")
if test "$text" != "abacade"; then exit 1; fi
if test "$(cat $SHARED.cur)" != 0; then exit 1; fi
if test "$(cat $SHARED.max)" != 3; then exit 1; fi