mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
ci: Add rtic-uitest feature
Fixes the trybuild ui tests for rtic crate
This commit is contained in:
parent
44af136605
commit
2e63f5bca3
3 changed files with 10 additions and 4 deletions
|
@ -74,6 +74,7 @@ thumbv8main-backend = ["rtic-macros/cortex-m-basepri"]
|
||||||
# riscv-esp32c3-backend = ["rtic-macros/riscv-esp32c3"]
|
# riscv-esp32c3-backend = ["rtic-macros/riscv-esp32c3"]
|
||||||
|
|
||||||
# needed for testing
|
# needed for testing
|
||||||
|
rtic-uitest = ["thumbv7-backend","rtic-macros/cortex-m-basepri"]
|
||||||
test-critical-section = ["cortex-m/critical-section-single-core", "rtic-monotonics/systick-100hz"]
|
test-critical-section = ["cortex-m/critical-section-single-core", "rtic-monotonics/systick-100hz"]
|
||||||
|
|
||||||
# [[example]]
|
# [[example]]
|
||||||
|
|
|
@ -20,10 +20,10 @@ compile_error!(
|
||||||
"Building for Cortex-M with source masking, but 'thumbv6-backend' or 'thumbv8base-backend' backend not selected"
|
"Building for Cortex-M with source masking, but 'thumbv6-backend' or 'thumbv8base-backend' backend not selected"
|
||||||
);
|
);
|
||||||
|
|
||||||
#[cfg(any(feature = "cortex-m-basepri"))]
|
#[cfg(any(feature = "cortex-m-basepri", feature = "rtic-uitest"))]
|
||||||
pub use cortex_basepri::*;
|
pub use cortex_basepri::*;
|
||||||
|
|
||||||
#[cfg(any(feature = "cortex-m-basepri"))]
|
#[cfg(any(feature = "cortex-m-basepri", feature = "rtic-uitest"))]
|
||||||
mod cortex_basepri;
|
mod cortex_basepri;
|
||||||
|
|
||||||
#[cfg(feature = "cortex-m-source-masking")]
|
#[cfg(feature = "cortex-m-source-masking")]
|
||||||
|
@ -33,7 +33,11 @@ pub use cortex_source_mask::*;
|
||||||
mod cortex_source_mask;
|
mod cortex_source_mask;
|
||||||
|
|
||||||
/// Priority conversion, takes logical priorities 1..=N and converts it to NVIC priority.
|
/// Priority conversion, takes logical priorities 1..=N and converts it to NVIC priority.
|
||||||
#[cfg(any(feature = "cortex-m-basepri", feature = "cortex-m-source-masking",))]
|
#[cfg(any(
|
||||||
|
feature = "cortex-m-basepri",
|
||||||
|
feature = "cortex-m-source-masking",
|
||||||
|
feature = "rtic-uitest",
|
||||||
|
))]
|
||||||
#[inline]
|
#[inline]
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub const fn cortex_logical2hw(logical: u8, nvic_prio_bits: u8) -> u8 {
|
pub const fn cortex_logical2hw(logical: u8, nvic_prio_bits: u8) -> u8 {
|
||||||
|
|
|
@ -38,9 +38,10 @@ impl TestMetadata {
|
||||||
match package {
|
match package {
|
||||||
Package::Rtic => {
|
Package::Rtic => {
|
||||||
let features = Some(format!(
|
let features = Some(format!(
|
||||||
"{},{}",
|
"{},{},{}",
|
||||||
DEFAULT_FEATURES,
|
DEFAULT_FEATURES,
|
||||||
backend.to_rtic_feature(),
|
backend.to_rtic_feature(),
|
||||||
|
"rtic-uitest"
|
||||||
));
|
));
|
||||||
CargoCommand::Test {
|
CargoCommand::Test {
|
||||||
package: Some(package),
|
package: Some(package),
|
||||||
|
|
Loading…
Reference in a new issue