diff options
| author | bors <bors@rust-lang.org> | 2025-09-20 16:33:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-20 16:33:23 +0000 |
| commit | dd7fda570040e8a736f7d8bc28ddd1b444aabc82 (patch) | |
| tree | b50cd2f0e536f2886a185151fab7bce05e357332 /src/doc/rustc-dev-guide | |
| parent | 9f2ef0f14d6028c5108643cafa6e2c617834594b (diff) | |
| parent | 48c1249bfff63607116e346ffcb0d330737ea9cc (diff) | |
| download | rust-dd7fda570040e8a736f7d8bc28ddd1b444aabc82.tar.gz rust-dd7fda570040e8a736f7d8bc28ddd1b444aabc82.zip | |
Auto merge of #146812 - matthiaskrgr:rollup-aiap18m, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - rust-lang/rust#144592 (generate list of all variants with `target_spec_enum`) - rust-lang/rust#146762 (Fix and provide instructions for running test suite on Apple simulators) - rust-lang/rust#146770 (fixes for numerous clippy warnings) - rust-lang/rust#146774 (Allow running `x <cmd> <path>` from a different directory) - rust-lang/rust#146800 (Fix unsupported `std::sys::thread` after move) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/running.md | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/running.md b/src/doc/rustc-dev-guide/src/tests/running.md index 317b65f98cd..482f3c42578 100644 --- a/src/doc/rustc-dev-guide/src/tests/running.md +++ b/src/doc/rustc-dev-guide/src/tests/running.md @@ -339,9 +339,34 @@ results. The Docker image is set up to launch `remote-test-server` and the build tools use `remote-test-client` to communicate with the server to coordinate running tests (see [src/bootstrap/src/core/build_steps/test.rs]). -> **TODO** -> -> - Is there any support for using an iOS emulator? +To run on the iOS/tvOS/watchOS/visionOS simulator, we can similarly treat it as +a "remote" machine. A curious detail here is that the network is shared between +the simulator instance and the host macOS, so we can use the local loopback +address `127.0.0.1`. Something like the following should work: + +```sh +# Build the test server for the iOS simulator: +./x build src/tools/remote-test-server --target aarch64-apple-ios-sim + +# If you already have a simulator instance open, copy the device UUID from: +xcrun simctl list devices booted +UDID=01234567-89AB-CDEF-0123-456789ABCDEF + +# Alternatively, create and boot a new simulator instance: +xcrun simctl list runtimes +xcrun simctl list devicetypes +UDID=$(xcrun simctl create $CHOSEN_DEVICE_TYPE $CHOSEN_RUNTIME) +xcrun simctl boot $UDID +# See https://nshipster.com/simctl/ for details. + +# Spawn the runner on port 12345: +xcrun simctl spawn $UDID ./build/host/stage2-tools/aarch64-apple-ios-sim/release/remote-test-server -v --bind 127.0.0.1:12345 + +# In a new terminal, run tests via the runner: +export TEST_DEVICE_ADDR="127.0.0.1:12345" +./x test --host='' --target aarch64-apple-ios-sim --skip tests/debuginfo +# FIXME(madsmtm): Allow debuginfo tests to work (maybe needs `.dSYM` folder to be copied to the target?). +``` [armhf-gnu]: https://github.com/rust-lang/rust/tree/master/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile [QEMU]: https://www.qemu.org/ |
