MDL-60978 testing: Support ability to run phpunit in isolated process

This commit is contained in:
Andrew Nicols
2019-06-21 14:36:13 +08:00
parent 3cb2c5657a
commit af1a436b2b
6 changed files with 64 additions and 35 deletions
+6 -2
View File
@@ -620,8 +620,12 @@ setup_validate_php_configuration();
setup_DB();
if (PHPUNIT_TEST and !PHPUNIT_UTIL) {
// make sure tests do not run in parallel
test_lock::acquire('phpunit');
// Make sure tests do not run in parallel.
$suffix = '';
if (phpunit_util::is_in_isolated_process()) {
$suffix = '.isolated';
}
test_lock::acquire('phpunit', $suffix);
$dbhash = null;
try {
if ($dbhash = $DB->get_field('config', 'value', array('name'=>'phpunittest'))) {