aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2023-01-08 19:56:47 +0100
committerGravatar Henrik Tjäder <henrik@tjaders.com> 2023-03-01 00:33:28 +0100
commit35c97b61c17a30de675eb1c7f852a100b200a0c2 (patch)
treea4228d68aeab2f5aa32b26649e5664d20adfa729
parentceaf3613d3256f60b139a4f93220e3c298603b83 (diff)
downloadrtic-35c97b61c17a30de675eb1c7f852a100b200a0c2.tar.gz
rtic-35c97b61c17a30de675eb1c7f852a100b200a0c2.tar.zst
rtic-35c97b61c17a30de675eb1c7f852a100b200a0c2.zip
All examples pass with `cargo xtask --target all`
-rw-r--r--ci/expected/async-task-multiple-prios.run9
-rw-r--r--ci/expected/async-task.run3
-rw-r--r--ci/expected/big-struct-opt.run3
-rw-r--r--ci/expected/destructure.run4
-rw-r--r--ci/expected/extern_spawn.run3
-rw-r--r--ci/expected/locals.run2
-rw-r--r--ci/expected/not-sync.run3
-rw-r--r--examples/binds.rs3
-rw-r--r--examples/extern_binds.rs3
-rw-r--r--examples/generics.rs1
-rw-r--r--examples/hardware.rs3
-rw-r--r--examples/not-sync.rs2
-rw-r--r--xtask/src/main.rs10
13 files changed, 28 insertions, 21 deletions
diff --git a/ci/expected/async-task-multiple-prios.run b/ci/expected/async-task-multiple-prios.run
index 9b0f5336..0b42df0a 100644
--- a/ci/expected/async-task-multiple-prios.run
+++ b/ci/expected/async-task-multiple-prios.run
@@ -1,5 +1,6 @@
init
-hello from normal 2
-hello from async 2
-hello from normal 1
-hello from async 1
+hello from async 3 a 1
+hello from async 4 a 2
+hello from async 1 a 3
+hello from async 2 a 4
+idle
diff --git a/ci/expected/async-task.run b/ci/expected/async-task.run
index f7ce3a60..6787fa8f 100644
--- a/ci/expected/async-task.run
+++ b/ci/expected/async-task.run
@@ -1,3 +1,4 @@
init
-hello from normal
+hello from async2
hello from async
+idle
diff --git a/ci/expected/big-struct-opt.run b/ci/expected/big-struct-opt.run
index e69de29b..7fdef35d 100644
--- a/ci/expected/big-struct-opt.run
+++ b/ci/expected/big-struct-opt.run
@@ -0,0 +1,3 @@
+async_task data:[22, 22, 22, 22, 22]
+uart0 data:[22, 22, 22, 22, 22]
+idle
diff --git a/ci/expected/destructure.run b/ci/expected/destructure.run
index b9b7cc90..25a4b1bd 100644
--- a/ci/expected/destructure.run
+++ b/ci/expected/destructure.run
@@ -1,2 +1,2 @@
-foo: a = 0, b = 0, c = 0
-bar: a = 0, b = 0, c = 0
+bar: a = 0, b = 1, c = 2
+foo: a = 0, b = 1, c = 2
diff --git a/ci/expected/extern_spawn.run b/ci/expected/extern_spawn.run
index 2f8c74f6..257cc564 100644
--- a/ci/expected/extern_spawn.run
+++ b/ci/expected/extern_spawn.run
@@ -1,2 +1 @@
-foo 1, 2
-foo 2, 3
+foo
diff --git a/ci/expected/locals.run b/ci/expected/locals.run
index bf1d2076..4f1d3509 100644
--- a/ci/expected/locals.run
+++ b/ci/expected/locals.run
@@ -1,3 +1,3 @@
-foo: local_to_foo = 1
bar: local_to_bar = 1
+foo: local_to_foo = 1
idle: local_to_idle = 1
diff --git a/ci/expected/not-sync.run b/ci/expected/not-sync.run
index e69de29b..cd91476a 100644
--- a/ci/expected/not-sync.run
+++ b/ci/expected/not-sync.run
@@ -0,0 +1,3 @@
+init
+bar a 13
+foo a 13
diff --git a/examples/binds.rs b/examples/binds.rs
index d78dffbf..0c1ed971 100644
--- a/examples/binds.rs
+++ b/examples/binds.rs
@@ -34,10 +34,9 @@ mod app {
rtic::pend(Interrupt::UART0);
- debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
-
loop {
cortex_m::asm::nop();
+ debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
}
diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs
index 23b99d5a..b24e7a19 100644
--- a/examples/extern_binds.rs
+++ b/examples/extern_binds.rs
@@ -40,10 +40,9 @@ mod app {
rtic::pend(Interrupt::UART0);
- debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
-
loop {
cortex_m::asm::nop();
+ debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
}
diff --git a/examples/generics.rs b/examples/generics.rs
index 7117349a..dfd47adf 100644
--- a/examples/generics.rs
+++ b/examples/generics.rs
@@ -39,6 +39,7 @@ mod app {
rtic::pend(Interrupt::UART1);
+ cortex_m::asm::nop();
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
diff --git a/examples/hardware.rs b/examples/hardware.rs
index d3ceab9e..61eb6357 100644
--- a/examples/hardware.rs
+++ b/examples/hardware.rs
@@ -37,10 +37,9 @@ mod app {
rtic::pend(Interrupt::UART0);
- debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
-
loop {
cortex_m::asm::nop();
+ debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
}
diff --git a/examples/not-sync.rs b/examples/not-sync.rs
index 28a48f23..5d868dfb 100644
--- a/examples/not-sync.rs
+++ b/examples/not-sync.rs
@@ -62,6 +62,6 @@ mod app {
#[task(shared = [&shared])]
async fn bar(c: bar::Context) {
let shared: &NotSync = c.shared.shared;
- hprintln!("foo a {}", shared.data);
+ hprintln!("bar a {}", shared.data);
}
}
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index 76ce04bd..7eada917 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -87,12 +87,14 @@ fn main() -> anyhow::Result<()> {
let targets = [ARMV7M, ARMV6M];
let examples: Vec<_> = std::fs::read_dir("./examples")?
- .filter_map(|path| {
- path.map(|p| p.path().file_stem().unwrap().to_str().unwrap().to_string())
- .ok()
- })
+ .filter_map(|p| p.ok())
+ .map(|p| p.path())
+ .filter(|p| p.display().to_string().ends_with(".rs"))
+ .map(|path| path.file_stem().unwrap().to_str().unwrap().to_string())
.collect();
+ println!("examples: {examples:?}");
+
let opts = Options::from_args();
let target = &opts.target;