-
Notifications
You must be signed in to change notification settings - Fork 254
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
PART 1
Top level cargo test fails
HASH
commit ad6fedd35a9a17639edf44a59fab6a14b2707cce (HEAD -> master, origin/master, origin/HEAD)
Author: Rahix <rahix@rahix.de>
Date: Mon Sep 7 23:06:02 2020 +0200
generic: delay: Fix a compiler warning
Remove unnecessary parentheses.
Signed-off-by: Rahix <rahix@rahix.de>
REPRO
git clone https://github.com/Rahix/avr-hal
cd avr-hal
rustup override set nightly
cargo build
cargo test
ERROR
Compiling arduino-uno v0.1.0 (/home/todd/temp/foo/avr-hal/boards/arduino-uno)
Compiling arduino-mega2560 v0.1.0 (/home/todd/temp/foo/avr-hal/boards/arduino-mega2560)
Compiling sparkfun-pro-micro v0.1.0 (/home/todd/temp/foo/avr-hal/boards/sparkfun-pro-micro)
Compiling arduino-leonardo v0.1.0 (/home/todd/temp/foo/avr-hal/boards/arduino-leonardo)
error: Ensure that you are using an AVR target! You may need to change directories or pass a --target flag to cargo. See
https://github.com/Rahix/avr-device/pull/41 for more details.
--> boards/arduino-uno/examples/uno-panic.rs:27:1
|
27 | #[arduino_uno::entry]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
EXPECTED
I suspect this is an issue with the use of workspaces. As shown in PART 2 below, running cargo test within one of the crates fails for a different reason there.
Full file attached.
cargo-test-out.txt
QUESTION
Why aren't the tests being run as part of the travis build? I only see cargo build being run.
PART 2
Device cargo test fails, too, but with different errors.
REPRO
cd boards/arduino-uno
cargo build (succeeds)
cargo clean
cargo test
ERROR
Compiling nb v1.0.0
Compiling void v1.0.2
Compiling ufmt-write v0.1.0 (https://github.com/Rahix/ufmt.git?rev=12225dc1678e42fecb0e8635bf80f501e24817d9#12225dc1)
Compiling cfg-if v0.1.10
Compiling vcell v0.1.2
Compiling panic-halt v0.2.0
Compiling bare-metal v0.2.5
error: duplicate lang item in crate `core` (which `rustc_std_workspace_core` depends on): `bool`.
|
= note: the lang item is first defined in crate `core` (which `vcell` depends on)
= note: first definition in `core` loaded from /home/todd/temp/foo/avr-hal/target/avr-atmega328p/debug/deps/libcore-77c7fc359a8bad07.rmeta
= note: second definition in `core` loaded from /home/todd/temp/foo/avr-hal/target/avr-atmega328p/debug/deps/libcore-6d69c1e64d8513e0.rmeta
...
EXPECTED
Why don't the tests pass? Why is there this issue with duplicate definitions? Is this the real problem or is this masking some other, known, issue?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested