-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[android] Replace URL tests that use hardcoded /tmp #2145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[android] Replace URL tests that use hardcoded /tmp #2145
Conversation
3cebf23
to
c49f9fa
Compare
Replaced the test implementation for smaller tests testing each of the parts of From my understanding, even in Windows, the URL path separator is still |
c49f9fa
to
f3b0874
Compare
Small fix for macOS (a problem using temporary directory with unexisting paths not removing the |
@swift-ci test |
I’m puzzled. From reading https://ci.swift.org/view/Pull%20Request/job/swift-corelibs-foundation-PR-Linux/2672/console (which seems to be the tests for this PR), it seems to have tested the previous version (c49f9fa) instead of the last version (f3b0874). |
@swift-ci test |
f3b0874
to
2164780
Compare
@swift-ci please test |
Has anyone any more feedback about these changes? Otherwise it would be great to merge. Thanks. |
2164780
to
5aa745c
Compare
Ready for review. Rebased with master and removed the conflicts with the recent changes for Windows. @swift-ci please test |
5aa745c
to
cf156ed
Compare
Rebased on top of a more current master and check it still works on Linux and Android. @spevans, @millenomi, @compnerd: Does someone has something to say in favor or against this PR? I would love to get it merged to improve the Android support. @swift-ci please test Linux platform |
cf156ed
to
015e4a2
Compare
@swift-ci please test Linux platform |
In Android /tmp doesn't exist, and the temporary directory is normally /data/local/tmp. It is not a symlink. The tests were mostly working, but because `resolvingSymlinksInPath` returns a trailing slash if the directory actually exists, in Android it was returning without the final trailing slash in some of the cases. The changes split the large test into smaller pieces that test one of the behaviours of `resolvingSymlinksInPath`, and tries not to use the temporarl directory by itself or suppose anything about it. There are, however, a couple of tests that check behaviours that are only applicable to Darwin, so those tests are only performed in Darwin platforms.
015e4a2
to
d5185bf
Compare
@swift-ci please test |
Rebased and removed the couple of |
Can we finally get this in? I tried it when compiling master natively on Android and it gets all the tests working, along with this small tweak:
I know everyone is on winter break now, but would be good to finally get this in next month. |
This pull needs to be rebased. It fixes the last remaining failing test when compiling and running TestFoundation natively on an Android host. |
I was waiting for some reviewer accepting the changes (/cc @millenomi, @spevans, @compnerd). I might try to rebase during the weekend, but I cannot longer work as much as before. You are free to copy this changes, rebase them, and open another if you want to take over. |
Did what you suggested, this is in now, can be closed. |
In Android /tmp doesn't exist, and the temporary directory is normally
/data/local/tmp. It is not a symlink. The tests were mostly working, but
because
resolvingSymlinksInPath
returns a trailing slash if thedirectory actually exists, in Android it was returning without the final
trailing slash in some of the cases.
The changes split the large test into smaller pieces that test one of
the behaviours of
resolvingSymlinksInPath
, and tries not to use thetemporarl directory by itself or suppose anything about it.
There are, however, a couple of tests that check behaviours that are
only applicable to Darwin, so those tests are only performed in Darwin
platforms.