@@ -98,7 +98,72 @@ including:
98
98
99
99
## Testing infrastructure
100
100
101
- TODO - bors, platforms, etc.
101
+ When a Pull Request is opened on Github, [ Travis] will automatically launch a
102
+ build that will run all tests on a single configuration (x86-64 linux). In
103
+ essence, it runs ` ./x.py test ` after building.
104
+
105
+ The integration bot [ bors] is used for coordinating merges to the master
106
+ branch. When a PR is approved, it goes into a [ queue] where merges are tested
107
+ one at a time on a wide set of platforms using Travis and [ Appveyor]
108
+ (currently over 50 different configurations). Most platforms only run the
109
+ build steps, some run a restricted set of tests, only a subset run the full
110
+ suite of tests (see Rust's [ platform tiers] ).
111
+
112
+ [ Travis ] : https://travis-ci.org/rust-lang/rust
113
+ [ bors ] : https://github.com/servo/homu
114
+ [ queue ] : https://buildbot2.rust-lang.org/homu/queue/rust
115
+ [ Appveyor ] : https://ci.appveyor.com/project/rust-lang/rust
116
+ [ platform tiers ] : https://forge.rust-lang.org/platform-support.html
117
+
118
+ ## Testing with Docker images
119
+
120
+ The Rust tree includes [ Docker] image definitions for the platforms used on
121
+ Travis in [ src/ci/docker] . The script [ src/ci/docker/run.sh] is used to build
122
+ the Docker image, run it, build Rust within the image, and run the tests.
123
+
124
+ > TODO: What is a typical workflow for testing/debugging on a platform that
125
+ > you don't have easy access to? Do people build Docker images and enter them
126
+ > to test things out?
127
+
128
+ [ Docker ] : https://www.docker.com/
129
+ [ src/ci/docker ] : https://github.com/rust-lang/rust/tree/master/src/ci/docker
130
+ [ src/ci/docker/run.sh ] : https://github.com/rust-lang/rust/blob/master/src/ci/docker/run.sh
131
+
132
+ ## Testing on emulators
133
+
134
+ Some platforms are tested via an emulator for architectures that aren't
135
+ readily available. There is a set of tools for orchestrating running the
136
+ tests within the emulator. Platforms such as ` arm-android ` and
137
+ ` arm-unknown-linux-gnueabihf ` are set up to automatically run the tests under
138
+ emulation on Travis. The following will take a look at how a target's tests
139
+ are run under emulation.
140
+
141
+ The Docker image for [ armhf-gnu] includes [ QEMU] to emulate the ARM CPU
142
+ architecture. Included in the Rust tree are the tools [ remote-test-client]
143
+ and [ remote-test-server] which are programs for sending test programs and
144
+ libraries to the emulator, and running the tests within the emulator, and
145
+ reading the results. The Docker image is set up to launch
146
+ ` remote-test-server ` and the build tools use ` remote-test-client ` to
147
+ communicate with the server to coordinate running tests (see
148
+ [ src/bootstrap/test.rs] ).
149
+
150
+ > TODO: What are the steps for manually running tests within an emulator?
151
+ > ` ./src/ci/docker/run.sh armhf-gnu ` will do everything, but takes hours to
152
+ > run and doesn't offer much help with interacting within the emulator.
153
+ >
154
+ > Is there any support for emulating other (non-Android) platforms, such as
155
+ > running on an iOS emulator?
156
+ >
157
+ > Is there anything else interesting that can be said here about running tests
158
+ > remotely on real hardware?
159
+ >
160
+ > It's also unclear to me how the wasm or asm.js tests are run.
161
+
162
+ [ armhf-gnu ] : https://github.com/rust-lang/rust/tree/master/src/ci/docker/armhf-gnu
163
+ [ QEMU ] : https://www.qemu.org/
164
+ [ remote-test-client ] : https://github.com/rust-lang/rust/tree/master/src/tools/remote-test-client
165
+ [ remote-test-server ] : https://github.com/rust-lang/rust/tree/master/src/tools/remote-test-server
166
+ [ src/bootstrap/test.rs ] : https://github.com/rust-lang/rust/tree/master/src/bootstrap/test.rs
102
167
103
168
## Crater
104
169
0 commit comments