aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Tjäder <henrik@tjaders.com>2023-03-04 02:11:50 +0100
committerHenrik Tjäder <henrik@tjaders.com>2023-03-04 20:22:45 +0100
commit2e63f5bca30acdec81495e0dc59aa6f7ebff5976 (patch)
tree569e2a77582620ea22233f2b066bbc56a8a95d86
parent44af1366056a06247b3ee0f153d5274cb4658c43 (diff)
ci: Add rtic-uitest feature
Fixes the trybuild ui tests for rtic crate
-rw-r--r--rtic/Cargo.toml1
-rw-r--r--rtic/src/export.rs10
-rw-r--r--xtask/src/argument_parsing.rs3
3 files changed, 10 insertions, 4 deletions
diff --git a/rtic/Cargo.toml b/rtic/Cargo.toml
index e73b970..ccda992 100644
--- a/rtic/Cargo.toml
+++ b/rtic/Cargo.toml
@@ -74,6 +74,7 @@ thumbv8main-backend = ["rtic-macros/cortex-m-basepri"]
# riscv-esp32c3-backend = ["rtic-macros/riscv-esp32c3"]
# 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"]
# [[example]]
diff --git a/rtic/src/export.rs b/rtic/src/export.rs
index 6fc97ad..86e9c3a 100644
--- a/rtic/src/export.rs
+++ b/rtic/src/export.rs
@@ -20,10 +20,10 @@ compile_error!(
"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::*;
-#[cfg(any(feature = "cortex-m-basepri"))]
+#[cfg(any(feature = "cortex-m-basepri", feature = "rtic-uitest"))]
mod cortex_basepri;
#[cfg(feature = "cortex-m-source-masking")]
@@ -33,7 +33,11 @@ pub use cortex_source_mask::*;
mod cortex_source_mask;
/// 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]
#[must_use]
pub const fn cortex_logical2hw(logical: u8, nvic_prio_bits: u8) -> u8 {
diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs
index 1fc06c1..aef5e3a 100644
--- a/xtask/src/argument_parsing.rs
+++ b/xtask/src/argument_parsing.rs
@@ -38,9 +38,10 @@ impl TestMetadata {
match package {
Package::Rtic => {
let features = Some(format!(
- "{},{}",
+ "{},{},{}",
DEFAULT_FEATURES,
backend.to_rtic_feature(),
+ "rtic-uitest"
));
CargoCommand::Test {
package: Some(package),