Bug #64409
Bug #40005: Several unit tests fail under Windows system
Failing unit tests on windows because of symlinks
Status: | Resolved | Start date: | 2015-01-21 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Nicole Cordes | % Done: | 100% |
|
Category: | - | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 7 | Is Regression: | No | |
PHP Version: | Sprint Focus: | On Location Sprint | ||
Complexity: |
Description
When running the TYPO3 CMS unit tests on Windows errors ocurr, if the windows configuration is not set accordingly:
1) TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest::removeDirectoryRemovesSymlink symlink(): Cannot create symlink, error code(1314) D:\typo3\master\typo3\sysext\extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest.php:172 D:\typo3\master\Packages\Libraries\phpunit\phpunit\phpunit:62 2) TYPO3\CMS\Extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest::removeDirectoryDoesNotRemoveContentOfSymlinkedTargetDirectory symlink(): Cannot create symlink, error code(1314) D:\typo3\master\typo3\sysext\extensionmanager\Tests\Unit\Utility\FileHandlingUtilityTest.php:193 D:\typo3\master\Packages\Libraries\phpunit\phpunit\phpunit:62
According to http://wiki.typo3.org/Flow_Installation_Hints special rights have to be set on Windows in order to be able to create symlinks.
If TYPO3 is running on Windows, the install tool should try to create a symlink and display a warning if it fails and hint to the according configuration help.
Related issues
Associated revisions
[BUGFIX] Improve file handling on Windows systems
Calling unlink() on a symlink that points to a directory
fails on Windows. Solution is to use rmdir() instead to
remove the symlink.
Furthermore it fixes a wrong usage of DIRECTORY_SEPARATOR
within the FileHandlingUtility.
Releases: master, 6.2
Resolves: #64409
Change-Id: Idc6ff3eb1214ed8f5cb0f69f15a2d5a6a3dcfafe
Reviewed-on: http://review.typo3.org/36359
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Jan Helke <typo3@helke.de>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
[BUGFIX] Improve file handling on Windows systems
Calling unlink() on a symlink that points to a directory
fails on Windows. Solution is to use rmdir() instead to
remove the symlink.
Furthermore it fixes a wrong usage of DIRECTORY_SEPARATOR
within the FileHandlingUtility.
Releases: master, 6.2
Resolves: #64409
Change-Id: Idc6ff3eb1214ed8f5cb0f69f15a2d5a6a3dcfafe
Reviewed-on: http://review.typo3.org/36372
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
History
#1 Updated by Stephan Großberndt 6 months ago
On Windows 7 Home Premium secpol.msc is not available, but "Polsedit - User Policies Editor" from http://www.southsoftware.com/ seems to do the job to change "SeCreateSymbolicLinkPrivilege".
#2 Updated by Mathias Schreiber 6 months ago
- Status changed from New to Needs Feedback
Running a website with admin privileges somewhat does not sound like an awesome idea to me :)
#3 Updated by Nicole Cordes 6 months ago
- Assigned To set to Nicole Cordes
- Parent task set to #40005
#4 Updated by Gerrit Code Review 6 months ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36359
#5 Updated by Gerrit Code Review 6 months ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36359
#6 Updated by Gerrit Code Review 6 months ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36372
#7 Updated by Nicole Cordes 6 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 386cd87d37bc24dff5a48468d401571e5e6e8cb6.
#8 Updated by Nicole Cordes 6 months ago
- Sprint Focus set to On Location Sprint