@@ -6,28 +6,35 @@ function exp {
66 echo " $( dirname $1 ) /expected/$( basename $1 ) .txt"
77}
88
9+ taskCount=0
10+ function maybeWait {
11+ let taskCount+=1
12+ # spawn in batch of 20 processes
13+ [[ $(( taskCount % 20 )) = 0 ]] && wait
14+ }
15+
916# parsing
1017for file in tests/parsing/{errors,infiniteLoops,recovery}/** /* .(res| resi); do
11- lib/rescript.exe -recover -print ml $file & > $( exp $file ) &
18+ lib/rescript.exe -recover -print ml $file & > $( exp $file ) & maybeWait
1219done
1320for file in tests/parsing/{grammar,other}/** /* .(res| resi); do
14- lib/rescript.exe -print ml $file & > $( exp $file ) &
21+ lib/rescript.exe -print ml $file & > $( exp $file ) & maybeWait
1522done
1623
1724# printing
1825for file in tests/{printer,conversion}/** /* .(res| resi| ml| mli); do
19- lib/rescript.exe $file & > $( exp $file ) &
26+ lib/rescript.exe $file & > $( exp $file ) & maybeWait
2027done
2128for file in tests/{printer,conversion}/** /* .re; do
22- lib/refmt.exe --parse re --print binary $file | lib/rescript.exe -parse reasonBinary & > $( exp $file ) &
29+ lib/refmt.exe --parse re --print binary $file | lib/rescript.exe -parse reasonBinary & > $( exp $file ) & maybeWait
2330done
2431for file in tests/{printer,conversion}/** /* .rei; do
25- lib/refmt.exe --parse re --print binary --interface true $file | lib/rescript.exe -parse reasonBinary -interface & > $( exp $file ) &
32+ lib/refmt.exe --parse re --print binary --interface true $file | lib/rescript.exe -parse reasonBinary -interface & > $( exp $file ) & maybeWait
2633done
2734
2835# printing with ppx
2936for file in tests/ppx/react/* .(res| resi); do
30- lib/rescript.exe -ppx jsx $file & > $( exp $file ) &
37+ lib/rescript.exe -ppx jsx $file & > $( exp $file ) & maybeWait
3138done
3239
3340wait
0 commit comments