public function tearDown() { try { $sys_data_dir_arg = escapeshellarg($GLOBALS['sys_data_dir']); $this->system_command->exec("sudo -u gitolite /usr/share/tuleap/plugins/git/bin/gl-delete-test-repository.sh {$sys_data_dir_arg}/gitolite/repositories/test_project"); } catch (Exception $e) { //ignore errors } parent::tearDown(); $GLOBALS['sys_data_dir'] = $this->old_sys_data_dir; ForgeConfig::restore(); PermissionsManager::clearInstance(); PluginManager::clearInstance(); UserManager::clearInstance(); unset($GLOBALS['tmp_dir']); //revert gitolite driver setAdminPath in its builder chdir($this->old_cwd); }