Merge branch 'MDL-49840-master' of git://github.com/andrewnicols/moodle

This commit is contained in:
David Monllao
2015-05-01 11:05:59 +08:00
5 changed files with 1764 additions and 17 deletions
+1 -2
View File
@@ -26,9 +26,8 @@ CVS
/.buildpath
/.cache
phpunit.xml
# Composer support - only composer.json is to be in git, the rest is installed in each checkout.
# Composer support. Do not ignore composer.json, or composer.lock. These should be shipped by us.
composer.phar
composer.lock
/vendor/
/behat.yml
*/yui/build/*/*-coverage.js
+2 -14
View File
@@ -99,25 +99,13 @@ if ($options['parallel'] && $options['parallel'] > 1) {
$cwd = getcwd();
$output = null;
$installcomposer = true;
// If behat dependencies not downloaded then do it first, else symfony/process can't be used.
if ($options['parallel'] && !file_exists(__DIR__ . "/../../../../vendor/autoload.php")) {
$installcomposer = false;
testing_update_composer_dependencies();
}
testing_update_composer_dependencies();
// Check whether the behat test environment needs to be updated.
chdir(__DIR__);
exec("php $utilfile --diag $paralleloption", $output, $code);
// Check if composer needs to be updated.
if ($installcomposer &&
($code == BEHAT_EXITCODE_INSTALL || $code == BEHAT_EXITCODE_REINSTALL || $code == BEHAT_EXITCODE_COMPOSER)) {
testing_update_composer_dependencies();
// Check again for behat test site and see if it's install or re-install.
chdir(__DIR__);
exec("php $utilfile --diag $paralleloption", $output, $code);
}
if ($code == 0) {
echo "Behat test environment already installed\n";
+3
View File
@@ -39,6 +39,7 @@ require_once(__DIR__.'/../../../../lib/phpunit/bootstraplib.php');
require_once(__DIR__.'/../../../../lib/testing/lib.php');
echo "Initialising Moodle PHPUnit test environment...\n";
testing_update_composer_dependencies();
$output = null;
exec('php --version', $output, $code);
@@ -72,4 +73,6 @@ if ($code == 0) {
passthru("php util.php --buildconfig", $code);
echo "\n";
echo "PHPUnit test environment setup complete.\n";
exit(0);
Generated
+1757
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -193,7 +193,7 @@ function testing_update_composer_dependencies() {
}
// Update composer dependencies.
passthru("php composer.phar update", $code);
passthru("php composer.phar install", $code);
if ($code != 0) {
exit($code);
}