add option to use-or-start ios simulator
It would be great if, like the libc-crate does:
https://github.com/rust-lang/libc/blob/master/ci/ios/deploy_and_run_on_ios_simulator.rs#L59
dinghy could start an ios-simulator.
Maybe dinghy could:
- have an option to list all simulators installed
- have an option to select the ios-simulator instance to either use (if its already started) or start
Of course none of this is necessary because users can already do this via the terminal, but I think it would be nice to be able to do this directly via dinghy.
@snipsco libc is not running any tests on iOS anymore. That is, the ABI that the standard library uses to call C APIs for, e.g., opening a file, memcpy, etc. might become incorrect.
It would be great if there was an easy way to run libc-test on the iOS simulator at least.
I'm not sure I understand what you are asking for. Are you asking if we could find a way (with or withoug dinghy) to have the libc test suire run again ?
Are you asking if we could find a way (with or withoug dinghy) to have the libc test suire run again ?
That would be the goal, but what I am asking is for something like:
cargo install dinghy
cargo dinghy test --device=ios-simulator-XY --target=x86_64-apple-ios
To compile the whole thing with the appropriate SDKs for the target, and then: see if the simulator is already started, and if it isn't, then check if it is installed, and if so start it, and run the tests there.
Ideally without any extra configuration. I think that would allow us to easily achieve the goal, but maybe there is a better and simpler way for us to get there?
The problem is, last time I checked, launching app in the ios emulator was FUBAR, neither the straight xcrun nor the llvm hack we use for devices were working anymore.
I'll try again someday, maybe apple did something right for once.
The problem is, last time I checked, launching app in the ios emulator was FUBAR, neither the straight xcrun nor the llvm hack we use for devices were working anymore.
Ah, damn, so those must be the same issues that we were experiencing. I thought that maybe dinghy was working around these somehow. Damn.
These are some of the issues we were seeing: https://github.com/rust-lang/rust/issues/55477 https://github.com/rust-lang/rust/issues/52699
So, #96 added a work around to fix the underlying issue with lldb. In CI for dinghy itself, we could actually use this feature. Since #96 was added, I've had a few instances myself where I've needed to build an iOS simulator and boot it in CI.
It'd be nice if Dinghy could:
- Build a sim if one is not booted
- Boot a sim if one is not built or booted
- And then run the regular tests.
If there's still interest in this, I'm up for implementing it.
I have no objection with a PR doing that. Hopefully this one will be relatively straightforward compared to the other one, and not too much of a nightmare to maintain.
@gnzlbg are you still a stakeholder in that or should we ping somebody else ?