-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
./x.py test
for thumb*-none-*
targets fails with "cargo must succeed"
#52163
Comments
./x.py test
for thumb*-none-*
targets fails./x.py test
for thumb*-none-*
targets fails with "cargo must succeed"
Here's a little more background for reference: What we are trying to do/ContextWe would like to run tests for the We are also working on adding a Dockerfile to support this CI testing. In the future, we would like to add additional tests in this style - where we would like the CI to build a binary only for our target where we can perform static analysis (e.g. check the binary output for symbols, size, etc), or dynamic analysis (running the resulting binary in QEMU). We have tried to model our testing after the existing CI tests based on the What we need help withAt the moment, we are not sure whether this process should be failing here. Based on Support for this target in |
The actual error from the gist is failure to build
|
Yes, but the ‘std’ can be successfully compiled via ‘./x.py dist’ for that target. |
I wanted to expand on my previous comment, and perhaps provide a little more context/detail. Thanks to @kennytm for taking a look already :) The issue we are seeing is that the test system There are two problems with that:
Issue 2 describes the symptom we are seeing, where the build process is failing because there is no So, in my opinion, there are two possible ways forward:
I still don't have a good understanding of why this is an issue for us (e.g. Another note about @sekineh's comment that |
@alexcrichton - From looking at the |
wasm32 is not a no_std target; it supports std -- I don't know about the test crate. (I believe some parts of std just call unimplemented! on wasm so std supports wasm in the "at least compiles" sense). |
Thanks @japaric, I'm not sure where I got that it was a no_std target. Did it used to be, and I'm just out of the loop? I'll update my other comments at some point today to take out the details about Perhaps it would just make sense for us to call a shell script that does something like this instead of trying to use # Build a compiler for us to use, just for the host
x.py build
git clone <some embedded example> && cd $_
<path to built cargo> build --target thumbv7m-none-eabi ...
# some procedure to validate binary produced
verify_bin <path to binary>
exit $? |
I'm fairly confident that that misconception came from my edit of So the conclusion is that |
Would it work if we remove this line: Line 969 in 1fa76a4
? Or change to |
The short answer is 'Yes'. If I commented out the line 969,
Huge hint. A possible hack is to add |
Ah yes, as @japaric mentioned the wasm target does include both libtest and libstd, so it's not quite the same. In general I don't think there's any way to get I'd recommend that if we wanted to add CI for this target that we'd write one-off tests in |
Thanks, @japaric , @kennytm and @alexcrichton for the help! For the record, I ended up with this snippet:
And it runs
I could add this line into our (embedded CI) pull request. |
If we only run (cc @Mark-Simulacrum) |
@kennytm my current version does not use snippet v2:
|
I included the snippet v2 into my folk of rust. Later, I'll open the pull request including
|
snippet v2 changed the behavior in printf-debug suggested I'd fallback to the snippet v1 which is supposed to be more conservative change. snippet v1:
snippet v3:
|
I pushed the snippet v3 to the PR because I think it's more reviewer friendly. |
Add CI test harness for `thumb*` targets. [IRR-2018-embedded] This pull request will do the following (rather trivial) changes: - Fix rust-lang#52163. In other words, we enabled `./x.py test src/test/run-make` for `no_std` targets. - Modify `dist-various-1` Dockerfile. - CI now performs `run-make` test run on the targets below: - `thumbv6m-none-eabi` - `thumbv7m-none-eabi` - `thumbv7em-none-eabi` - `thumbv7em-none-eabihf`. - ~~Add `thumb-none` Dockerfile.~~ - ~~Initially, `thumbv7m-none-eabi`, `thumbv7em-none-eabi` and `thumbv7em-none-eabihf` are included as the tested target. `thumbv6m-none-eabi` is disabled for now because LLVM support is not certain.~~ - ~~Add `thumb-none` to .travis.yml~~ Note: - `run-make` tests are not implemented yet. This PR is test harness only. The amount of change is very small, but I'd like to open the pull request while the change is trivial. Because I'm not very used to pull request process, I want to make a small progress first. This PR will be a foundation for later additions.
Add CI test harness for `thumb*` targets. [IRR-2018-embedded] This pull request will do the following (rather trivial) changes: - Fix rust-lang#52163. In other words, we enabled `./x.py test src/test/run-make` for `no_std` targets. - Modify `dist-various-1` Dockerfile. - CI now performs `run-make` test run on the targets below: - `thumbv6m-none-eabi` - `thumbv7m-none-eabi` - `thumbv7em-none-eabi` - `thumbv7em-none-eabihf`. - ~~Add `thumb-none` Dockerfile.~~ - ~~Initially, `thumbv7m-none-eabi`, `thumbv7em-none-eabi` and `thumbv7em-none-eabihf` are included as the tested target. `thumbv6m-none-eabi` is disabled for now because LLVM support is not certain.~~ - ~~Add `thumb-none` to .travis.yml~~ Note: - `run-make` tests are not implemented yet. This PR is test harness only. The amount of change is very small, but I'd like to open the pull request while the change is trivial. Because I'm not very used to pull request process, I want to make a small progress first. This PR will be a foundation for later additions. CC @kennytm @jamesmunns @nerdyvaishali
Updates (2018-07-18)
./x.py test src/test/run-make
forno_std
targets.Environment
sudo apt install gcc-arm-none-eabi libnewlib-arm-none-eabi
Problem
For cross target, we can't run the following tests:
Typical error we got is
cargo must succeed
:The full log is posted on gist:
Notes
ui
tests andrun-make
tests require a simulator to be executed. The whole tests are run on host only (host: Linux x86_64 in this case).Background
We need to land CI for
thumb*
targets before Rust 2018 is released.The fact the test harness cannot be run is the major blocker for the CI addition.
CC @jamesmunns @nerdyvaishali @kennytm
The text was updated successfully, but these errors were encountered: