Skip to content
Snippets Groups Projects
Commit 02406e9b authored by Ted Bowman's avatar Ted Bowman
Browse files

Issue #3441799: Skip build tests if SQLite is too old

parent 0b506ab7
No related branches found
No related tags found
2 merge requests!1100Issue #3436993: Ensure exceptions are shown if updating extensions and there...,!1058Issue #3441799 build tests sqlite version
Pipeline #151361 canceled
...@@ -11,6 +11,7 @@ use Drupal\Component\Serialization\Yaml; ...@@ -11,6 +11,7 @@ use Drupal\Component\Serialization\Yaml;
// CORE_MR_ONLY:use Drupal\Composer\Composer; // CORE_MR_ONLY:use Drupal\Composer\Composer;
use Drupal\package_manager\Event\CollectPathsToExcludeEvent; use Drupal\package_manager\Event\CollectPathsToExcludeEvent;
use Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber; use Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber;
use Drupal\sqlite\Driver\Database\sqlite\Install\Tasks;
use Drupal\Tests\package_manager\Traits\AssertPreconditionsTrait; use Drupal\Tests\package_manager\Traits\AssertPreconditionsTrait;
use Drupal\Tests\package_manager\Traits\FixtureUtilityTrait; use Drupal\Tests\package_manager\Traits\FixtureUtilityTrait;
use Drupal\Tests\RandomGeneratorTrait; use Drupal\Tests\RandomGeneratorTrait;
...@@ -62,6 +63,18 @@ abstract class TemplateProjectTestBase extends QuickStartTestBase { ...@@ -62,6 +63,18 @@ abstract class TemplateProjectTestBase extends QuickStartTestBase {
*/ */
protected const MAX_EXECUTION_TIME = 20; protected const MAX_EXECUTION_TIME = 20;
/**
* {@inheritdoc}
*/
protected function setUp(): void {
// Build tests cannot be run if Sqlite minimum version is not met.
$sqlite = (new \PDO('sqlite::memory:'))->query('select sqlite_version()')->fetch()[0];
if (version_compare($sqlite, Tasks::SQLITE_MINIMUM_VERSION) < 0) {
$this->markTestSkipped();
}
parent::setUp();
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment