# loop - loop over all tests in new subdirectory # # Multiple copies (up to 10) of loop can sun simultaneously (e.g. # multi-CPUs). # # This is an infinite loop unless some test fails - ^C to exit ORGPWD=$PWD echo "This is an infinite loop - to exit, type several ^C rapidly" for LOOP in loop1 loop2 loop3 loop4 loop5 loop6 loop7 loop8 loop9 loop10 do if ! mkdir $LOOP >/dev/null 2>&1; then continue; fi trap "rm -fr $ORGPWD/$LOOP" EXIT HUP INT QUIT TERM # clean up on exit cp * $LOOP >/dev/null 2>&1 # just the files, not the directories 'cd' $LOOP N=1 while ./all do echo echo "$LOOP $N complete" echo let N=$N+1 done echo "$LOOP failed in loop $N" 'cd' $ORGPWD sleep 3 exit 1 done echo "loop cannot create sub-directory" exit 1