Skip to content

Commit a489a33

Browse files
author
Oleksii Korshenko
committed
MAGETWO-63512: Travis build failures because the job exceeded the maximum time limit for jobs
1 parent a2e715a commit a489a33

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

dev/travis/before_script.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ case $TEST_SUITE in
1313

1414
test_set_list=$(find testsuite/* -maxdepth 1 -mindepth 1 -type d | sort)
1515
test_set_count=$(printf "$test_set_list" | wc -l)
16-
test_set_size[1]=$(printf "%.0f" $(echo "$test_set_count*0.15" | bc))
17-
test_set_size[2]=$(printf "%.0f" $(echo "$test_set_count*0.3" | bc))
18-
test_set_size[3]=$(printf "%.0f" $(echo "$test_set_count*0.55" | bc))
16+
test_set_size[1]=$(printf "%.0f" $(echo "$test_set_count*0.12" | bc))
17+
test_set_size[2]=$(printf "%.0f" $(echo "$test_set_count*0.15" | bc))
18+
test_set_size[3]=$((test_set_count-test_set_size[1]-test_set_size[2])) #73%
19+
echo "Total = ${test_set_count}; Batch #1 = ${test_set_size[1]}; Batch #2 = ${test_set_size[2]}; Batch #3 = ${test_set_size[3]};";
1920

2021
echo "==> preparing integration testsuite on index $INTEGRATION_INDEX with set size of ${test_set_size[$INTEGRATION_INDEX]}"
2122
cp phpunit.xml.dist phpunit.xml
@@ -27,20 +28,23 @@ case $TEST_SUITE in
2728
fi
2829

2930
# divide test sets up by indexed testsuites
30-
i=0; j=1
31+
i=0; j=1; dirIndex=1; testIndex=1;
3132
for test_set in $test_set_list; do
3233
test_xml[j]+=" <directory suffix=\"Test.php\">$test_set</directory>\n"
3334

3435
if [[ $j -eq $INTEGRATION_INDEX ]]; then
35-
echo " + including $test_set"
36+
echo "$dirIndex: Batch #$j($testIndex of ${test_set_size[$j]}): + including $test_set"
3637
else
37-
echo " - excluding $test_set"
38+
echo "$dirIndex: Batch #$j($testIndex of ${test_set_size[$j]}): + excluding $test_set"
3839
fi
3940

41+
testIndex=$((testIndex+1))
42+
dirIndex=$((dirIndex+1))
4043
i=$((i+1))
4144
if [ $i -eq ${test_set_size[$j]} ] && [ $j -lt $INTEGRATION_SETS ]; then
4245
j=$((j+1))
4346
i=0
47+
testIndex=1
4448
fi
4549
done
4650

0 commit comments

Comments
 (0)