mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-32323 do lot try to acquire lock before dataroot init
This commit is contained in:
parent
4787e466d6
commit
6c583c75f9
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue