Exclude long tests on Travis

Tests that run too long without output tends to break Travis builds.
This is typically the case when running code-coverage, so we need to
exclude a few test cases to ensure that the builds are stable.
This commit is contained in:
Adrien Crivelli 2016-09-09 01:26:46 +09:00
parent 1a2a6816fb
commit 2c96a06d6e
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
1 changed files with 14 additions and 0 deletions

View File

@ -25,6 +25,20 @@ class SampleTest extends \PHPUnit_Framework_TestCase
'20 Read OOCalc with PCLZip', // Crash: Call to undefined method \PhpOffice\PhpSpreadsheet\Shared\ZipArchive::statName() '20 Read OOCalc with PCLZip', // Crash: Call to undefined method \PhpOffice\PhpSpreadsheet\Shared\ZipArchive::statName()
'21 Pdf', // for now we don't have 3rdparty libs to tests PDF, but it should be added '21 Pdf', // for now we don't have 3rdparty libs to tests PDF, but it should be added
]; ];
// Unfortunately some tests are too long be ran with code-coverage
// analysis on Travis, so we need to exclude them
global $argv;
if (in_array('--coverage-clover', $argv)) {
$tooLongToBeCovered = [
'06 Largescale',
'06 Largescale with cellcaching',
'06 Largescale with cellcaching sqlite',
'06 Largescale with cellcaching sqlite3',
];
$skipped = array_merge($skipped, $tooLongToBeCovered);
}
$helper = new \PhpOffice\PhpSpreadsheet\Helper\Sample(); $helper = new \PhpOffice\PhpSpreadsheet\Helper\Sample();
$samples = []; $samples = [];
foreach ($helper->getSamples() as $name => $sample) { foreach ($helper->getSamples() as $name => $sample) {