Skip to content

Commit 51abe3c

Browse files
authored
Merge pull request #2595 from rust-lang/rustc-pull
Rustc pull update
2 parents b64dae5 + cecd670 commit 51abe3c

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2f3f27bf79ec147fec9d2e7980605307a74067f4
1+
9f32ccf35fb877270bc44a86a126440f04d676d0

src/tests/intro.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ package tests:
7070

7171
Tidy is a custom tool used for validating source code style and formatting
7272
conventions, such as rejecting long lines. There is more information in the
73-
[section on coding conventions](../conventions.md#formatting).
73+
[section on coding conventions](../conventions.md#formatting) or the [Tidy Readme].
7474

7575
> Examples: `./x test tidy`
7676
77+
[Tidy Readme]: https://github.com/rust-lang/rust/blob/master/src/tools/tidy/Readme.md
78+
7779

7880
### Formatting
7981

src/tests/running.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,34 @@ results. The Docker image is set up to launch `remote-test-server` and the
339339
build tools use `remote-test-client` to communicate with the server to
340340
coordinate running tests (see [src/bootstrap/src/core/build_steps/test.rs]).
341341

342-
> **TODO**
343-
>
344-
> - Is there any support for using an iOS emulator?
342+
To run on the iOS/tvOS/watchOS/visionOS simulator, we can similarly treat it as
343+
a "remote" machine. A curious detail here is that the network is shared between
344+
the simulator instance and the host macOS, so we can use the local loopback
345+
address `127.0.0.1`. Something like the following should work:
346+
347+
```sh
348+
# Build the test server for the iOS simulator:
349+
./x build src/tools/remote-test-server --target aarch64-apple-ios-sim
350+
351+
# If you already have a simulator instance open, copy the device UUID from:
352+
xcrun simctl list devices booted
353+
UDID=01234567-89AB-CDEF-0123-456789ABCDEF
354+
355+
# Alternatively, create and boot a new simulator instance:
356+
xcrun simctl list runtimes
357+
xcrun simctl list devicetypes
358+
UDID=$(xcrun simctl create $CHOSEN_DEVICE_TYPE $CHOSEN_RUNTIME)
359+
xcrun simctl boot $UDID
360+
# See https://nshipster.com/simctl/ for details.
361+
362+
# Spawn the runner on port 12345:
363+
xcrun simctl spawn $UDID ./build/host/stage2-tools/aarch64-apple-ios-sim/release/remote-test-server -v --bind 127.0.0.1:12345
364+
365+
# In a new terminal, run tests via the runner:
366+
export TEST_DEVICE_ADDR="127.0.0.1:12345"
367+
./x test --host='' --target aarch64-apple-ios-sim --skip tests/debuginfo
368+
# FIXME(madsmtm): Allow debuginfo tests to work (maybe needs `.dSYM` folder to be copied to the target?).
369+
```
345370

346371
[armhf-gnu]: https://github.com/rust-lang/rust/tree/master/src/ci/docker/host-x86_64/armhf-gnu/Dockerfile
347372
[QEMU]: https://www.qemu.org/

0 commit comments

Comments
 (0)