ZipStream-PHP
ZipStream-PHP copied to clipboard
Fix MacOs Tests
Description of the problem
Currently the MacOS tests hang forever in the CI. THis has to be solved to be able to run the CI.
- [ ] Fix Test
- [ ] Re-Enable Test in Workflow
- [ ] Require test to pass before merging in the repository settings
I do not have a MacOS device. Therefore I can't fix this one. If anyone is interested to make sure this lib is MacOS compatible, please have a look at this issue.
i want to help out, what is needed here? make the unit tests work on osx?
@pieterdt that would be awesome 🙂
See: https://github.com/maennchen/ZipStream-PHP/blob/master/.github/workflows/php.yml#L30-L33
is it the intention to run the test with the archive utility? because the command line can zip/unzip as well with the regular commands. Of course, chances are very high that a mac user will (unknowingly) trigger the archive utility, but if they have configured another tool as the default, that will be used.
Has the test worked in the past? because the archive utility is not scriptable, so not suited to be called on the command line.
@pieterdt The idea was to use the archive utility. The reason for that is that it is the standard tool people use.
I think I was able to use the archive utility via cli at some point. No idea is that still works.
It should probably be possible to use the open
cmd on OSX to trigger it and just sleep for a bit in PHP before checking if it did it properly.
Yes, problem there is that the location of the unzipped files is unknown. You need to check the preferences of the utility to find it.
I have been searching quite a bit to find the plist file for the archive utility in order to read the settings, but no luck so far.
On Thu, Mar 4, 2021, 17:49 Jonatan Männchen [email protected] wrote:
@pieterdt https://github.com/pieterdt The idea was to use the archive utility. The reason for that is that it is the standard tool people use.
I think I was able to use the archive utility via cli at some point. No idea is that still works.
It should probably be possible to use the open cmd on OSX to trigger it and just sleep for a bit in PHP before checking if it did it properly.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maennchen/ZipStream-PHP/issues/170#issuecomment-790760573, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFYV5BDYWQODFXSP5Y7CC3TB62ZFANCNFSM4TJL47HA .
@pieterdt Apparently the Archive Utility use a tool called ditto
internally. One could try if ditto
also produces problems with known broken zips to verify that.
Yes Found that as well, but had no luck unzipping with dito on a file that worked with the archive utility :^)
On Thu, Mar 4, 2021, 18:17 Jonatan Männchen [email protected] wrote:
@pieterdt https://github.com/pieterdt Apparently the Archive Utility use a tool called ditto internally. One could try if ditto also produces problems with known broken zips to verify that.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/maennchen/ZipStream-PHP/issues/170#issuecomment-790783120, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFYV5EYGQF3AKOFGDGYAEDTB66DPANCNFSM4TJL47HA .
Can ditto open the file mentioned here? https://github.com/maennchen/ZipStream-PHP/issues/49#issuecomment-310385534
ditto could open zip files I created with Archive utility, but it failed on a bunch of zipfiles I created with Zipstream.
In that case the error is
ditto: Couldn't read pkzip signature. ditto: Not a central directory signature
The file from isue 49 resulted also in an error:
ditto: file1.txt: No such file or directory ditto: Couldn't read pkzip signature.
But it could be opened by the Archive utility.
Opening test.zip with vi also resulted in a bit of error reporting when navigating to file1.txt. So I think it is corrupt, but Archive utility could recover it. Ditto not.
Test was removed in #203
Extracted into #230