-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
ProcessInfo is empty when invoking carton test
#400
Comments
The
The WASI runtime passes only That being said, we can consider injecting some environment variables that appear only for testing. Does it help your scenario? |
That would definitely help, yup! This is a reliable way to detect XCTest runs from both Linux/Windows SPM and Xcode, so a way of doing the same for Wasm would be great. |
(Also, just to confirm, is there any other existing way for Swift code to detect if it executing from carton tests? The subject of the issue is just one way I attempted to do so.) |
There's no way for now as far as I remember. |
I am trying to figure out how to detect, at runtime, from SwiftWasm, if it's being run from
carton test
, butProcessInfo
arguments and environment are totally empty. I was hoping to be able to see something like["carton", "test", "--environment", "node"]
and use this.(I can't rely on arguments passed by the user, since this is library code.)
The text was updated successfully, but these errors were encountered: