[TASK] Find functional tests automatically, optimize travis-ci 01/29901/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Tue, 6 May 2014 18:15:39 +0000 (20:15 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 6 May 2014 19:25:55 +0000 (21:25 +0200)
Simalar to UnitTests.xml, FunctionalTests.xml no longer register
single test suites but find all functional tests cases using a
wildcard.

For travis-ci, single tests cases are now given to parallel using
gnu find. This leads to a nice performance improvement on travis
since more but shorter processes are executed, sharing the available
hardware more effectively.

Change-Id: I8dc34ed2fcc1ae8390bc05dbe6f5e7009af17a36
Resolves: #58578
Related: #58533
Releases: 6.2
Reviewed-on: https://review.typo3.org/29901
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
.travis.yml
typo3/sysext/core/Build/FunctionalTests.xml

index 4ee44be..25ff7fe 100644 (file)
@@ -47,7 +47,7 @@ script:
     export typo3DatabaseHost="localhost";
     export typo3DatabaseUsername="root";
     export typo3DatabasePassword="";
-    grep directory typo3/sysext/core/Build/FunctionalTests.xml | awk '{print $1}' | sed 's%<directory>\(\.\./\)*\(typo3/sysext.*\)</directory>$%\2%g' | parallel --gnu 'echo; echo "Running functional {} tests"; ./bin/phpunit --colors -c typo3/sysext/core/Build/FunctionalTests.xml {}'
+    find . -wholename '*typo3/sysext/*/Tests/Functional/*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; ./bin/phpunit --colors -c typo3/sysext/core/Build/FunctionalTests.xml {}'
   - >
     echo;
     echo "Running php lint";
index ee538fd..db3cc77 100644 (file)
        verbose="false"
 >
        <testsuites>
-               <testsuite name="EXT:core tests">
-                       <directory>../../../../typo3/sysext/core/Tests/Functional/</directory>
-               </testsuite>
-               <testsuite name="EXT:frontend tests">
-                       <directory>../../../../typo3/sysext/frontend/Tests/Functional/</directory>
-               </testsuite>
-               <testsuite name="EXT:impexp tests">
-                       <directory>../../../../typo3/sysext/impexp/Tests/Functional/</directory>
-               </testsuite>
-               <testsuite name="EXT:workspaces tests">
-                       <directory>../../../../typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/</directory>
-                       <directory>../../../../typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/</directory>
-                       <directory>../../../../typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/</directory>
-                       <directory>../../../../typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/</directory>
-                       <directory>../../../../typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/</directory>
-                       <directory>../../../../typo3/sysext/workspaces/Tests/Functional/Service/</directory>
-               </testsuite>
-               <testsuite name="EXT:extbase tests">
-                       <directory>../../../../typo3/sysext/extbase/Tests/Functional/</directory>
+               <testsuite name="Core tests">
+                       <directory>../../../../typo3/sysext/*/Tests/Functional/</directory>
                </testsuite>
        </testsuites>
 </phpunit>