diff options
| author | Corey Farwell <coreyf@rwell.org> | 2017-02-07 22:54:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-07 22:54:23 -0500 |
| commit | 370b63f38669970fd352bdaed6cdb05855f50f99 (patch) | |
| tree | b4e2f8e300829a49157c61f88ffb410097fbfd40 /src/bootstrap/lib.rs | |
| parent | 4c29a19bd50de03acc8ade05c4f908d0f860e797 (diff) | |
| parent | 1747ce25ad122e1b330eeb1eaf4e2d67f10b355d (diff) | |
| download | rust-370b63f38669970fd352bdaed6cdb05855f50f99.tar.gz rust-370b63f38669970fd352bdaed6cdb05855f50f99.zip | |
Rollup merge of #39400 - alexcrichton:arm-cross-test, r=brson
Add support for test suites emulated in QEMU This commit adds support to the build system to execute test suites that cannot run natively but can instead run inside of a QEMU emulator. A proof-of-concept builder was added for the `arm-unknown-linux-gnueabihf` target to show off how this might work. In general the architecture is to have a server running inside of the emulator which a local client connects to. The protocol between the server/client supports compiling tests on the host and running them on the target inside the emulator. Closes #33114
Diffstat (limited to 'src/bootstrap/lib.rs')
| -rw-r--r-- | src/bootstrap/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index df1218752d1..e58dcc9fce9 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -878,6 +878,17 @@ impl Build { .map(|p| &**p) } + /// Returns the root of the "rootfs" image that this target will be using, + /// if one was configured. + /// + /// If `Some` is returned then that means that tests for this target are + /// emulated with QEMU and binaries will need to be shipped to the emulator. + fn qemu_rootfs(&self, target: &str) -> Option<&Path> { + self.config.target_config.get(target) + .and_then(|t| t.qemu_rootfs.as_ref()) + .map(|p| &**p) + } + /// Path to the python interpreter to use fn python(&self) -> &Path { self.config.python.as_ref().unwrap() |
