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
Test fixes for RedHat #1562
Test fixes for RedHat #1562
Conversation
@swift-ci please test |
|
For |
Seems reasonable |
@swift-ci please test |
let exeName = "/xdgTestHelper.app/Contents/MacOS/xdgTestHelper" | ||
#else | ||
let exeName = "/xdgTestHelper/xdgTestHelper" | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems ok, but it's somewhat ironic that bundle can't find this helper itself. That's what it's supposed to be there fore in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue here is that we are not building xdgTestHelper in a bundle directory structure. It may be worth it to figure that out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll aim to do that in a follow-up PR as it is complicated by the fact that there are 3 separate targets being built (Linux, macOS and the Darwin Compatibility testing). However it should act as a good test of the Bundle
class so it is definitely worth doing.
@davezarzycki Are you able to give this a test on redhat? |
@swift-ci please test |
I haven't tested them, but they look fine. |
- Build as part of DarwinCompatibilityTests. - Add TestBundle.xdgTestHelperURL() to return the URL of the executable.
- Process: When setting the current directory for a sub-process, set the PWD environment variable to this directory if the default environment is used. This matches Darwin's behaviour. - Use xdgTestHelper as an external test program for TestProcess, taking options for getcwd() and getenv("PWD"). - SR-7748: Use /tmp as a test directory and run it through realpath() to test against the result of getcwd(). On macOS, /tmp is a symlink to private/tmp. - SR-7747: FileManager.attributesOfFileSystem(forPath:) may return .systemNumber as 0 on some systems (eg tmpfs on Redhat). Remove this invalid test.
@swift-ci please test and merge |
1 similar comment
@swift-ci please test and merge |
Process: Make xdgTestHelper into a self-contained file
Build as part of DarwinCompatibilityTests.
Add TestBundle.xdgTestHelperURL() to return the URL of the
executable.
Process: When setting the current directory for a sub-process,
set the PWD environment variable to this directory if the
default environment is used. This matches Darwin's behaviour.
Use xdgTestHelper as an external test program for TestProcess,
taking options for getcwd() and getenv("PWD").
SR-7748: Use /tmp as a test directory and run it through realpath()
to test against the result of getcwd(). On macOS, /tmp is a symlink
to private/tmp.
SR-7747: FileManager.attributesOfFileSystem(forPath:) may return
.systemNumber as 0 on some systems (eg tmpfs on Redhat). Remove
this invalid test.