0 ; $i--) { $current = $commits[$i-1]; shell_exec('git checkout $current'); // Checks if composer.json is change $isChange = shell_exec("git diff HEAD^ composer.json"); if ($isChange !== null) { // If change, update deps `composer update --prefer-source --quiet --no-interaction`; } // Install MediaWiki shell_exec('php maintenance/install.php CIwiki admin --pass CI --dbtype mysql --dbname CI_db --dbuser CI_user --dbpass "" --dbserver 10.135.32.252 --scriptpath "/w" && echo -en "\n\nrequire_once __DIR__ . \'/includes/DevelopmentSettings.php\';\n" >> ./LocalSettings.php'); // Run PHPUnit test shell_exec('php tests/phpunit/phpunit.php > test.log 2>&1'); $report = file_get_contents('test.log'); $pos = strpos($report, 'Uncaught MWException: SpecialEditWatchlistTest::tearDown() must call parent::tearDown()'); if ($pos === null) { echo "We find out $current\n"; die; } // Drop environment shell_exec('mysql -h 10.135.32.252 -u CI_user -e "drop database CI_db;"'); unlink('LocalSettings.php'); sleep(10); }