@@ -12,9 +12,13 @@ case $TEST_SUITE in
12
12
cd dev/tests/integration
13
13
14
14
test_set_list=$( find testsuite/* -maxdepth 1 -mindepth 1 -type d | sort)
15
- test_set_size=$(( $(printf "$test_set_list " | wc - l)/ INTEGRATION_SETS))
15
+ test_set_count=$( printf " $test_set_list " | wc -l)
16
+ test_set_size[1]=$( printf " %.0f" $( echo " $test_set_count *0.12" | bc) ) # 12%
17
+ test_set_size[2]=$( printf " %.0f" $( echo " $test_set_count *0.32" | bc) ) # 32%
18
+ test_set_size[3]=$(( test_set_count- test_set_size[1 ]- test_set_size[2 ])) # 56%
19
+ echo " Total = ${test_set_count} ; Batch #1 = ${test_set_size[1]} ; Batch #2 = ${test_set_size[2]} ; Batch #3 = ${test_set_size[3]} ;" ;
16
20
17
- echo " ==> preparing integration testsuite on index $INTEGRATION_INDEX with set size of $test_set_size "
21
+ echo " ==> preparing integration testsuite on index $INTEGRATION_INDEX with set size of ${ test_set_size[$INTEGRATION_INDEX]} "
18
22
cp phpunit.xml.dist phpunit.xml
19
23
20
24
# remove memory usage tests if from any set other than the first
@@ -24,20 +28,23 @@ case $TEST_SUITE in
24
28
fi
25
29
26
30
# divide test sets up by indexed testsuites
27
- i=0; j=1
31
+ i=0; j=1; dirIndex=1 ; testIndex=1 ;
28
32
for test_set in $test_set_list ; do
29
33
test_xml[j]+=" <directory suffix=\" Test.php\" >$test_set </directory>\n"
30
34
31
35
if [[ $j -eq $INTEGRATION_INDEX ]]; then
32
- echo " + including $test_set "
36
+ echo " $dirIndex : Batch # $j ( $testIndex of ${test_set_size[$j]} ): + including $test_set "
33
37
else
34
- echo " - excluding $test_set "
38
+ echo " $dirIndex : Batch # $j ( $testIndex of ${test_set_size[$j]} ): + excluding $test_set "
35
39
fi
36
40
41
+ testIndex=$(( testIndex+ 1 ))
42
+ dirIndex=$(( dirIndex+ 1 ))
37
43
i=$(( i+ 1 ))
38
- if [ $i -eq $test_set_size ] && [ $j -lt $INTEGRATION_SETS ]; then
44
+ if [ $i -eq ${ test_set_size[$j]} ] && [ $j -lt $INTEGRATION_SETS ]; then
39
45
j=$(( j+ 1 ))
40
46
i=0
47
+ testIndex=1
41
48
fi
42
49
done
43
50
0 commit comments