Skip to content

Commit

Permalink
Moar testing permutations.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Jun 5, 2017
1 parent cf673bd commit 238075d
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 4 deletions.
21 changes: 20 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 TEST_CHILDREN="drush-ops/config-extra"

before_install:
- echo 'mbstring.http_input = pass' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
Expand Down
14 changes: 12 additions & 2 deletions tests/Unish/UnishTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion tests/archiveDumpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
10 changes: 10 additions & 0 deletions tests/bootstrap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 2 additions & 0 deletions tests/makeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ function listMakefileTests() {
'md5' => '5ec081203131a1a3277c8b23f9ddb995',
'options' => array('no-core' => NULL),
),
/* TODO: http://download.gna.org/wkhtmltopdf/obsolete/linux/wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2 cannot be downloaded any longer
'bz2-singlefile' => array(
'name' => 'bzip2 single file',
'makefile' => 'bz2-singlefile.make',
'build' => TRUE,
'md5' => '4f9d57f6caaf6ece0526d867327621cc',
'options' => array('no-core' => NULL),
),
*/
'contrib-destination' => array(
'name' => 'Contrib-destination attribute',
'makefile' => 'contrib-destination.make',
Expand Down

0 comments on commit 238075d

Please sign in to comment.