Skip to content

Commit e3c955c

Browse files
author
Oleksii Korshenko
authored
Merge pull request #804 from magento-engcom/MAGETWO-63512
MAGETWO-63512: Travis build failures because the job time limit
2 parents 9536d0e + b036009 commit e3c955c

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ matrix:
3131
before_install: ./dev/travis/before_install.sh
3232
install: composer install --no-interaction --prefer-dist
3333
before_script: ./dev/travis/before_script.sh
34-
script:
34+
script:
3535
- cd dev/tests/$TEST_SUITE
3636
- test $TEST_SUITE = "static" && TEST_FILTER='--filter "Magento\\Test\\Php\\LiveCodeTest"' || true
3737
- phpunit $TEST_FILTER

dev/tests/integration/testsuite/Magento/Setup/Console/Command/I18nCollectPhrasesCommandTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function tearDown()
3535

3636
public function testExecuteConsoleOutput()
3737
{
38+
$this->markTestSkipped('MAGETWO-64249: Unexpected test exit on Travis CI');
3839
$this->tester->execute(
3940
[
4041
'directory' => BP . '/dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/',

dev/travis/before_script.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ case $TEST_SUITE in
1212
cd dev/tests/integration
1313

1414
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]};";
1620

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]}"
1822
cp phpunit.xml.dist phpunit.xml
1923

2024
# remove memory usage tests if from any set other than the first
@@ -24,20 +28,23 @@ case $TEST_SUITE in
2428
fi
2529

2630
# divide test sets up by indexed testsuites
27-
i=0; j=1
31+
i=0; j=1; dirIndex=1; testIndex=1;
2832
for test_set in $test_set_list; do
2933
test_xml[j]+=" <directory suffix=\"Test.php\">$test_set</directory>\n"
3034

3135
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"
3337
else
34-
echo " - excluding $test_set"
38+
echo "$dirIndex: Batch #$j($testIndex of ${test_set_size[$j]}): + excluding $test_set"
3539
fi
3640

41+
testIndex=$((testIndex+1))
42+
dirIndex=$((dirIndex+1))
3743
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
3945
j=$((j+1))
4046
i=0
47+
testIndex=1
4148
fi
4249
done
4350

0 commit comments

Comments
 (0)