mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-32323 do lot try to acquire lock before dataroot init
This commit is contained in:
parent
4787e466d6
commit
6c583c75f9
@ -72,6 +72,10 @@ class phpunit_util {
|
||||
*/
|
||||
public static function acquire_test_lock() {
|
||||
global $CFG;
|
||||
if (!file_exists("$CFG->phpunit_dataroot/phpunit")) {
|
||||
// dataroot not initialised yet
|
||||
return;
|
||||
}
|
||||
if (!file_exists("$CFG->phpunit_dataroot/phpunit/lock")) {
|
||||
file_put_contents("$CFG->phpunit_dataroot/phpunit/lock", 'This file prevents concurrent execution of Moodle PHPUnit tests');
|
||||
phpunit_boostrap_fix_file_permissions("$CFG->phpunit_dataroot/phpunit/lock");
|
||||
|
Loading…
x
Reference in New Issue
Block a user