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:
parent
1a2a6816fb
commit
2c96a06d6e
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue