Skip to content

Commit

Permalink
Merge branch 'MDL-62408_33_STABLE' of https://github.com/marxjohnson/…
Browse files Browse the repository at this point in the history
…moodle into MOODLE_33_STABLE
  • Loading branch information
stronk7 committed May 28, 2018
2 parents 7c84c19 + 6a5d9d0 commit 2ed6a29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/behat/classes/behat_config_util.php
Expand Up @@ -672,7 +672,7 @@ protected function get_behat_profile($profile, $values) {
public function profile_guided_allocate($features, $nbuckets, $instance) {

// No profile guided allocation is required in phpunit.
if (defined('PHPUNIT_TEST')) {
if (defined('PHPUNIT_TEST') && PHPUNIT_TEST) {
return false;
}

Expand Down Expand Up @@ -725,7 +725,8 @@ public function profile_guided_allocate($features, $nbuckets, $instance) {
$totalweight += $weight;
}

if ($totalweight && !defined('BEHAT_DISABLE_HISTOGRAM') && $instance == $nbuckets && !defined('PHPUNIT_TEST')) {
if ($totalweight && !defined('BEHAT_DISABLE_HISTOGRAM') && $instance == $nbuckets
&& (!defined('PHPUNIT_TEST') || !PHPUNIT_TEST)) {
echo "Bucket weightings:\n";
foreach ($weights as $k => $weight) {
echo $k + 1 . ": " . str_repeat('*', 70 * $nbuckets * $weight / $totalweight) . PHP_EOL;
Expand Down Expand Up @@ -960,7 +961,7 @@ protected function remove_blacklisted_features_from_list($features, $blacklist)
unset($features[$key]);
} else {
$featurestocheck = $this->get_components_features();
if (!isset($featurestocheck[$key]) && !defined('PHPUNIT_TEST')) {
if (!isset($featurestocheck[$key]) && (!defined('PHPUNIT_TEST') || !PHPUNIT_TEST)) {
behat_error(BEHAT_EXITCODE_REQUIREMENT, 'Blacklisted feature "' . $blacklistpath . '" not found.');
}
}
Expand Down

0 comments on commit 2ed6a29

Please sign in to comment.