github.phpd.cn/thought-machine/please@v12.2.0+incompatible/tools/misc/bootstrap_stress_test.sh (about) 1 #!/bin/bash 2 # Used to stress test caching via bootstrap. Essentially we should bootstrap once to 3 # build everything, then rerunning it a bunch of times in a loop should be very fast 4 # and retrieve everything from the cache. 5 # This script assumes the initial bootstrap has already run. 6 7 N="${1:-10}" 8 9 for i in `seq 1 $N`; do 10 echo "Round $i" 11 ./bootstrap.sh --plain_output || { echo "Bootstrap failed"; exit 1; } 12 BUILDING="$(grep "Building target" plz-out/log/*.log)" 13 if [ -n "$BUILDING" ]; then 14 echo "Found building targets:" 15 echo "$BUILDING" 16 exit 1 17 fi 18 RUNNING="$(grep "Running test" plz-out/log/test_build.log)" 19 if [ -n "$RUNNING" ]; then 20 echo "Found running tests:" 21 echo "$RUNNING" 22 exit 1 23 fi 24 done