diff --git a/.travis.yml b/.travis.yml index 7c51d6b97ec..20fc9c07e11 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,13 +36,20 @@ env: - UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=pm - UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--group=quick-drupal - UNISH_DRUPAL_MAJOR_VERSION=7 PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal -#D8 +#D8.3.x - UNISH_DRUPAL_MAJOR_VERSION=8 PHPUNIT_ARGS=--group=make - UNISH_DRUPAL_MAJOR_VERSION=8 PHPUNIT_ARGS=--group=base - UNISH_DRUPAL_MAJOR_VERSION=8 PHPUNIT_ARGS=--group=commands - UNISH_DRUPAL_MAJOR_VERSION=8 PHPUNIT_ARGS=--group=pm - UNISH_DRUPAL_MAJOR_VERSION=8 PHPUNIT_ARGS=--group=quick-drupal - UNISH_DRUPAL_MAJOR_VERSION=8 PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal TEST_CHILDREN="drush-ops/config-extra" +#D8.4.x + - UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=make + - UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=base + - UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=commands + - UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=pm + - UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=quick-drupal + - UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal # - UNISH_DB_URL=sqlite://none/of/this/matters PHPUNIT_ARGS=--group=make # - UNISH_DB_URL=sqlite://none/of/this/matters PHPUNIT_ARGS=--group=base @@ -86,6 +93,18 @@ matrix: env: UNISH_DRUPAL_MAJOR_VERSION=8 PHPUNIT_ARGS=--group=quick-drupal - php: 5.4 env: UNISH_DRUPAL_MAJOR_VERSION=8 PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal TEST_CHILDREN="drush-ops/config-extra" + - php: 5.4 + env: UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=make + - php: 5.4 + env: UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=base + - php: 5.4 + env: UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=commands + - php: 5.4 + env: UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=pm + - php: 5.4 + env: UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--group=quick-drupal + - php: 5.4 + env: UNISH_DRUPAL_MAJOR_VERSION=8 UNISH_DRUPAL_MINOR_VERSION=4.x PHPUNIT_ARGS=--exclude-group=base,make,commands,pm,quick-drupal" before_install: - echo 'mbstring.http_input = pass' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini diff --git a/tests/Unish/UnishTestCase.php b/tests/Unish/UnishTestCase.php index 37fe9806cd1..e9ae4ab8d75 100644 --- a/tests/Unish/UnishTestCase.php +++ b/tests/Unish/UnishTestCase.php @@ -263,7 +263,14 @@ function db_driver($db_url = UNISH_DB_URL) { return parse_url(UNISH_DB_URL, PHP_URL_SCHEME); } - function setUpDrupal($num_sites = 1, $install = FALSE, $version_string = UNISH_DRUPAL_MAJOR_VERSION, $profile = NULL) { + function defaultInstallationVerion() { + return UNISH_DRUPAL_MAJOR_VERSION . UNISH_DRUPAL_MINOR_VERSION; + } + + function setUpDrupal($num_sites = 1, $install = FALSE, $version_string = NULL, $profile = NULL) { + if (!$version_string) { + $version_string = UNISH_DRUPAL_MAJOR_VERSION; + } $sites_subdirs_all = array('dev', 'stage', 'prod', 'retired', 'elderly', 'dead', 'dust'); $sites_subdirs = array_slice($sites_subdirs_all, 0, $num_sites); $root = $this->webroot(); @@ -315,7 +322,10 @@ function setUpDrupal($num_sites = 1, $install = FALSE, $version_string = UNISH_D return self::$sites; } - function fetchInstallDrupal($env = 'dev', $install = FALSE, $version_string = UNISH_DRUPAL_MAJOR_VERSION, $profile = NULL, $separate_roots = FALSE) { + function fetchInstallDrupal($env = 'dev', $install = FALSE, $version_string = NULL, $profile = NULL, $separate_roots = FALSE) { + if (!$version_string) { + $version_string = UNISH_DRUPAL_MAJOR_VERSION; + } $root = $this->webroot(); $uri = $separate_roots ? "default" : "$env"; $options = array(); diff --git a/tests/archiveDumpTest.php b/tests/archiveDumpTest.php index cfeb48e9a48..5085142a94f 100644 --- a/tests/archiveDumpTest.php +++ b/tests/archiveDumpTest.php @@ -22,7 +22,7 @@ class archiveDumpCase extends CommandUnishTestCase { */ private function archiveDump($no_core) { $profile = UNISH_DRUPAL_MAJOR_VERSION >= 7 ? 'testing' : 'default'; - $this->fetchInstallDrupal(self::uri, TRUE, UNISH_DRUPAL_MAJOR_VERSION, $profile); + $this->fetchInstallDrupal(self::uri, TRUE, NULL, $profile); $root = $this->webroot(); $dump_dest = UNISH_SANDBOX . DIRECTORY_SEPARATOR . 'dump.tar.gz'; $options = array( diff --git a/tests/bootstrap.inc b/tests/bootstrap.inc index be5b978e9e0..ab7f8cc1939 100644 --- a/tests/bootstrap.inc +++ b/tests/bootstrap.inc @@ -31,6 +31,16 @@ function unish_init() { $unish_drupal_major = $GLOBALS['UNISH_DRUPAL_MAJOR_VERSION']; } define('UNISH_DRUPAL_MAJOR_VERSION', $unish_drupal_major); + $unish_drupal_minor = ''; + if ($unish_drupal_major == 8) { + if (getenv('UNISH_DRUPAL_MINOR_VERSION')) { + $unish_drupal_minor = '.' . getenv('UNISH_DRUPAL_MINOR_VERSION'); + } + elseif (isset($GLOBALS['UNISH_DRUPAL_MINOR_VERSION'])) { + $unish_drupal_minor = '.' . $GLOBALS['UNISH_DRUPAL_MINOR_VERSION']; + } + } + define('UNISH_DRUPAL_MINOR_VERSION', $unish_drupal_minor); // We read from env then globals then default to mysql. $unish_db_url = 'mysql://root:@127.0.0.1'; diff --git a/tests/makeTest.php b/tests/makeTest.php index 7741e77ae43..cccc70fa65c 100644 --- a/tests/makeTest.php +++ b/tests/makeTest.php @@ -380,6 +380,7 @@ function testMakeBZ2() { } } + /* TODO: http://download.gna.org/wkhtmltopdf/obsolete/linux/wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2 cannot be downloaded any longer function testMakeBZ2SingleFile() { // Silently skip bz2 test if bz2 is not installed. exec('which bzip2', $output, $whichBzip2ErrorCode); @@ -390,6 +391,7 @@ function testMakeBZ2SingleFile() { $this->markTestSkipped('bzip2 command not available.'); } } + */ function testMakeContribDestination() { $this->runMakefileTest('contrib-destination');