[TASK] travis-ci: Limit number of parallel jobs 67/47767/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 18 Apr 2016 22:03:05 +0000 (00:03 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 18 Apr 2016 22:55:57 +0000 (00:55 +0200)
The docker environment of travis-ci reports no solid amount of
available CPU's, so parallel forks a massive amount of processes
in parallel.
The patch limits the maximum number of jobs in parallel for
travis to 6. This should lead to full CPU usage (there should
be 2 hardware available) even if the one or the other process
is in i/o wait for mysql or similar, and 6 should still not
hammer the VM too much.
This has a number of advantages, since the overall memory
consumption is lower, the system has to do much less context
switches, we're a nicer neighbor, single tests are quicker
and the test order is better predictable.

Change-Id: I0965afb823d1a7d23fddbed8968c2ff313aa5db9
Resolves: #75764
Releases: master
Reviewed-on: https://review.typo3.org/47767
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
.travis.yml

index abf2cc0..320bae1 100644 (file)
@@ -64,7 +64,7 @@ script:
         export typo3DatabaseHost="localhost";
         export typo3DatabaseUsername="root";
         export typo3DatabasePassword="";
-        find . -wholename '*typo3/sysext/*/Tests/Functional/*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit -c typo3/sysext/core/Build/FunctionalTests.xml {}'
+        find . -wholename '*typo3/sysext/*/Tests/Functional/*Test.php' | parallel --jobs 6 --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit -c typo3/sysext/core/Build/FunctionalTests.xml {}'
     fi
   - >
     if [[ "$ACCEPTANCE_TESTS" == "yes" ]]; then
@@ -82,7 +82,7 @@ script:
     if [[ "$PHP_LINT" == "yes" ]]; then
         echo;
         echo "Running php lint";
-        find typo3/ -name \*.php -not -path "vendor/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
+        find typo3/ -name \*.php -not -path "vendor/*" | parallel --jobs 6 --gnu php -d display_errors=stderr -l {} > /dev/null \;
     fi
   - >
     if [[ "$XLF_CHECK" == "yes" ]]; then