aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Fresk <emil.fresk@gmail.com>2021-03-03 09:22:45 +0100
committerGitHub <noreply@github.com>2021-03-03 09:22:45 +0100
commit4714b8ee54d027ba6797731190a2368187a31c79 (patch)
tree5941bf7613f9195b04793c1227c840b89995c970
parent08a37d6d3d7e7f599c7d5b2723ed15d8355963d1 (diff)
parent5e5fbf0ee9b254ec7d61f3f820168f11cb6a2c14 (diff)
Merge pull request #450 from AfoHT/testssingleonly
Cleanup of tests, solve duplicate panic handler error
-rw-r--r--.github/workflows/build.yml4
-rw-r--r--Cargo.toml1
-rw-r--r--examples/big-struct-opt.rs2
-rw-r--r--examples/not-sync.rs2
-rw-r--r--examples/schedule.rs2
-rw-r--r--examples/t-binds.rs2
-rw-r--r--examples/t-cfg-resources.rs2
-rw-r--r--examples/t-cfg.rs2
-rw-r--r--examples/t-late-not-send.rs2
-rw-r--r--examples/t-resource.rs2
-rw-r--r--examples/t-schedule-core-stable.rs2
-rw-r--r--examples/t-schedule.rs2
-rw-r--r--examples/t-spawn.rs2
-rw-r--r--tests/tests.rs (renamed from tests/single.rs)2
-rw-r--r--ui/exception-invalid.rs (renamed from ui/single/exception-invalid.rs)0
-rw-r--r--ui/exception-invalid.stderr (renamed from ui/single/exception-invalid.stderr)0
-rw-r--r--ui/extern-interrupt-not-enough.rs (renamed from ui/single/extern-interrupt-not-enough.rs)0
-rw-r--r--ui/extern-interrupt-not-enough.stderr (renamed from ui/single/extern-interrupt-not-enough.stderr)0
-rw-r--r--ui/extern-interrupt-used.rs (renamed from ui/single/extern-interrupt-used.rs)0
-rw-r--r--ui/extern-interrupt-used.stderr (renamed from ui/single/extern-interrupt-used.stderr)0
-rw-r--r--ui/local-cfg-task-local-err.rs (renamed from ui/single/local-cfg-task-local-err.rs)0
-rw-r--r--ui/local-cfg-task-local-err.stderr (renamed from ui/single/local-cfg-task-local-err.stderr)0
-rw-r--r--ui/local-err.rs (renamed from ui/single/local-err.rs)0
-rw-r--r--ui/local-err.stderr (renamed from ui/single/local-err.stderr)0
-rw-r--r--ui/locals-cfg.rs (renamed from ui/single/locals-cfg.rs)3
-rw-r--r--ui/locals-cfg.stderr29
-rw-r--r--ui/resources-cfg.rs (renamed from ui/single/resources-cfg.rs)3
-rw-r--r--ui/resources-cfg.stderr (renamed from ui/single/resources-cfg.stderr)66
-rw-r--r--ui/single/locals-cfg.stderr35
-rw-r--r--ui/task-priority-too-high.rs (renamed from ui/single/task-priority-too-high.rs)0
-rw-r--r--ui/task-priority-too-high.stderr (renamed from ui/single/task-priority-too-high.stderr)0
31 files changed, 77 insertions, 88 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d9be520..e5f9943 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -474,7 +474,7 @@ jobs:
with:
use-cross: false
command: test
- args: --test single --features __v7
+ args: --test tests --features __v7
# Run test suite for thumbv6m
testv6:
@@ -515,7 +515,7 @@ jobs:
with:
use-cross: false
command: test
- args: --test single
+ args: --test tests
# Build documentation, check links
docs:
diff --git a/Cargo.toml b/Cargo.toml
index 12b25c4..dd4633b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -68,7 +68,6 @@ version_check = "0.9"
[dev-dependencies]
lm3s6965 = "0.1.3"
-panic-halt = "0.2.0"
cortex-m-semihosting = "0.3.3"
[dev-dependencies.panic-semihosting]
diff --git a/examples/big-struct-opt.rs b/examples/big-struct-opt.rs
index dc6e72f..e6a5c17 100644
--- a/examples/big-struct-opt.rs
+++ b/examples/big-struct-opt.rs
@@ -6,7 +6,7 @@
#![no_main]
#![no_std]
-use panic_halt as _;
+use panic_semihosting as _;
/// Some big struct
pub struct BigStruct {
diff --git a/examples/not-sync.rs b/examples/not-sync.rs
index 8189da5..f01d404 100644
--- a/examples/not-sync.rs
+++ b/examples/not-sync.rs
@@ -6,7 +6,7 @@
#![no_std]
use core::marker::PhantomData;
-use panic_halt as _;
+use panic_semihosting as _;
pub struct NotSync {
_0: PhantomData<*const ()>,
diff --git a/examples/schedule.rs b/examples/schedule.rs
index cdbdc0d..d6d4499 100644
--- a/examples/schedule.rs
+++ b/examples/schedule.rs
@@ -5,7 +5,7 @@
#![no_main]
#![no_std]
-use panic_halt as _;
+use panic_semihosting as _;
// NOTE: does NOT work on QEMU!
#[rtic::app(device = lm3s6965, dispatchers = [SSI0])]
diff --git a/examples/t-binds.rs b/examples/t-binds.rs
index 60afa35..fbc89e8 100644
--- a/examples/t-binds.rs
+++ b/examples/t-binds.rs
@@ -5,7 +5,7 @@
#![no_main]
#![no_std]
-use panic_halt as _;
+use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
mod app {
diff --git a/examples/t-cfg-resources.rs b/examples/t-cfg-resources.rs
index 990b01f..1adcb90 100644
--- a/examples/t-cfg-resources.rs
+++ b/examples/t-cfg-resources.rs
@@ -3,7 +3,7 @@
#![no_main]
#![no_std]
-use panic_halt as _;
+use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
mod app {
diff --git a/examples/t-cfg.rs b/examples/t-cfg.rs
index ff06ee8..ef591c4 100644
--- a/examples/t-cfg.rs
+++ b/examples/t-cfg.rs
@@ -3,7 +3,7 @@
#![no_main]
#![no_std]
-use panic_halt as _;
+use panic_semihosting as _;
#[rtic::app(device = lm3s6965, dispatchers = [SSI0, QEI0])]
mod app {
diff --git a/examples/t-late-not-send.rs b/examples/t-late-not-send.rs
index dae0aa9..579f843 100644
--- a/examples/t-late-not-send.rs
+++ b/examples/t-late-not-send.rs
@@ -5,7 +5,7 @@
use core::marker::PhantomData;
-use panic_halt as _;
+use panic_semihosting as _;
pub struct NotSend {
_0: PhantomData<*const ()>,
diff --git a/examples/t-resource.rs b/examples/t-resource.rs
index 164ea84..6e83069 100644
--- a/examples/t-resource.rs
+++ b/examples/t-resource.rs
@@ -5,7 +5,7 @@
#![no_main]
#![no_std]
-use panic_halt as _;
+use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
mod app {
diff --git a/examples/t-schedule-core-stable.rs b/examples/t-schedule-core-stable.rs
index adcc0b6..98d42ce 100644
--- a/examples/t-schedule-core-stable.rs
+++ b/examples/t-schedule-core-stable.rs
@@ -5,7 +5,7 @@
#![no_main]
#![no_std]
-use panic_halt as _;
+use panic_semihosting as _;
#[rtic::app(device = lm3s6965, dispatchers = [SSI0])]
mod app {
diff --git a/examples/t-schedule.rs b/examples/t-schedule.rs
index 259b226..bd0ab66 100644
--- a/examples/t-schedule.rs
+++ b/examples/t-schedule.rs
@@ -5,7 +5,7 @@
#![no_main]
#![no_std]
-use panic_halt as _;
+use panic_semihosting as _;
#[rtic::app(device = lm3s6965, dispatchers = [SSI0])]
mod app {
diff --git a/examples/t-spawn.rs b/examples/t-spawn.rs
index cc7754e..ca5c61b 100644
--- a/examples/t-spawn.rs
+++ b/examples/t-spawn.rs
@@ -5,7 +5,7 @@
#![no_main]
#![no_std]
-use panic_halt as _;
+use panic_semihosting as _;
#[rtic::app(device = lm3s6965, dispatchers = [SSI0])]
mod app {
diff --git a/tests/single.rs b/tests/tests.rs
index b5d480c..9fb88a1 100644
--- a/tests/single.rs
+++ b/tests/tests.rs
@@ -3,5 +3,5 @@ use trybuild::TestCases;
#[test]
fn ui() {
let t = TestCases::new();
- t.compile_fail("ui/single/*.rs");
+ t.compile_fail("ui/*.rs");
}
diff --git a/ui/single/exception-invalid.rs b/ui/exception-invalid.rs
index 04d9bc7..04d9bc7 100644
--- a/ui/single/exception-invalid.rs
+++ b/ui/exception-invalid.rs
diff --git a/ui/single/exception-invalid.stderr b/ui/exception-invalid.stderr
index 9021376..9021376 100644
--- a/ui/single/exception-invalid.stderr
+++ b/ui/exception-invalid.stderr
diff --git a/ui/single/extern-interrupt-not-enough.rs b/ui/extern-interrupt-not-enough.rs
index f262403..f262403 100644
--- a/ui/single/extern-interrupt-not-enough.rs
+++ b/ui/extern-interrupt-not-enough.rs
diff --git a/ui/single/extern-interrupt-not-enough.stderr b/ui/extern-interrupt-not-enough.stderr
index 14f8fe9..14f8fe9 100644
--- a/ui/single/extern-interrupt-not-enough.stderr
+++ b/ui/extern-interrupt-not-enough.stderr
diff --git a/ui/single/extern-interrupt-used.rs b/ui/extern-interrupt-used.rs
index 240e736..240e736 100644
--- a/ui/single/extern-interrupt-used.rs
+++ b/ui/extern-interrupt-used.rs
diff --git a/ui/single/extern-interrupt-used.stderr b/ui/extern-interrupt-used.stderr
index b4d8d16..b4d8d16 100644
--- a/ui/single/extern-interrupt-used.stderr
+++ b/ui/extern-interrupt-used.stderr
diff --git a/ui/single/local-cfg-task-local-err.rs b/ui/local-cfg-task-local-err.rs
index d4752ed..d4752ed 100644
--- a/ui/single/local-cfg-task-local-err.rs
+++ b/ui/local-cfg-task-local-err.rs
diff --git a/ui/single/local-cfg-task-local-err.stderr b/ui/local-cfg-task-local-err.stderr
index 73dfaeb..73dfaeb 100644
--- a/ui/single/local-cfg-task-local-err.stderr
+++ b/ui/local-cfg-task-local-err.stderr
diff --git a/ui/single/local-err.rs b/ui/local-err.rs
index 7ebfc06..7ebfc06 100644
--- a/ui/single/local-err.rs
+++ b/ui/local-err.rs
diff --git a/ui/single/local-err.stderr b/ui/local-err.stderr
index 88369d8..88369d8 100644
--- a/ui/single/local-err.stderr
+++ b/ui/local-err.stderr
diff --git a/ui/single/locals-cfg.rs b/ui/locals-cfg.rs
index 72e2aca..170d302 100644
--- a/ui/single/locals-cfg.rs
+++ b/ui/locals-cfg.rs
@@ -1,5 +1,6 @@
#![no_main]
-use panic_halt as _;
+
+use panic_semihosting as _;
#[rtic::app(device = lm3s6965, dispatchers = [SSI0])]
mod app {
diff --git a/ui/locals-cfg.stderr b/ui/locals-cfg.stderr
new file mode 100644
index 0000000..33a8075
--- /dev/null
+++ b/ui/locals-cfg.stderr
@@ -0,0 +1,29 @@
+error[E0425]: cannot find value `FOO` in this scope
+ --> $DIR/locals-cfg.rs:12:9
+ |
+12 | FOO;
+ | ^^^ not found in this scope
+
+error[E0425]: cannot find value `FOO` in this scope
+ --> $DIR/locals-cfg.rs:22:9
+ |
+22 | FOO;
+ | ^^^ not found in this scope
+
+error[E0425]: cannot find value `FOO` in this scope
+ --> $DIR/locals-cfg.rs:32:9
+ |
+32 | FOO;
+ | ^^^ not found in this scope
+
+error[E0425]: cannot find value `FOO` in this scope
+ --> $DIR/locals-cfg.rs:40:9
+ |
+40 | FOO;
+ | ^^^ not found in this scope
+
+error[E0425]: cannot find value `FOO` in this scope
+ --> $DIR/locals-cfg.rs:48:9
+ |
+48 | FOO;
+ | ^^^ not found in this scope
diff --git a/ui/single/resources-cfg.rs b/ui/resources-cfg.rs
index c11d2ba..c802a46 100644
--- a/ui/single/resources-cfg.rs
+++ b/ui/resources-cfg.rs
@@ -1,5 +1,6 @@
#![no_main]
-use panic_halt as _;
+
+use panic_semihosting as _;
#[rtic::app(device = lm3s6965)]
mod app {
diff --git a/ui/single/resources-cfg.stderr b/ui/resources-cfg.stderr
index 3bbbd2d..03612de 100644
--- a/ui/single/resources-cfg.stderr
+++ b/ui/resources-cfg.stderr
@@ -1,125 +1,119 @@
-error: duplicate lang item in crate `panic_halt` (which `$CRATE` depends on): `panic_impl`.
- |
- = note: the lang item is first defined in crate `std` (which `$CRATE` depends on)
- = note: first definition in `std` loaded from /usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-6f77337c1826707d.rlib
- = note: second definition in `panic_halt` loaded from $DIR/target/tests/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_halt-ad4cf7fac73711f1.rmeta
-
error[E0609]: no field `o1` on type `__rtic_internal_initResources<'_>`
- --> $DIR/resources-cfg.rs:47:21
+ --> $DIR/resources-cfg.rs:48:21
|
-47 | c.resources.o1;
+48 | c.resources.o1;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `o4` on type `__rtic_internal_initResources<'_>`
- --> $DIR/resources-cfg.rs:48:21
+ --> $DIR/resources-cfg.rs:49:21
|
-48 | c.resources.o4;
+49 | c.resources.o4;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `o5` on type `__rtic_internal_initResources<'_>`
- --> $DIR/resources-cfg.rs:49:21
+ --> $DIR/resources-cfg.rs:50:21
|
-49 | c.resources.o5;
+50 | c.resources.o5;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `o6` on type `__rtic_internal_initResources<'_>`
- --> $DIR/resources-cfg.rs:50:21
+ --> $DIR/resources-cfg.rs:51:21
|
-50 | c.resources.o6;
+51 | c.resources.o6;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `s3` on type `__rtic_internal_initResources<'_>`
- --> $DIR/resources-cfg.rs:51:21
+ --> $DIR/resources-cfg.rs:52:21
|
-51 | c.resources.s3;
+52 | c.resources.s3;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `o2` on type `__rtic_internal_idleResources<'_>`
- --> $DIR/resources-cfg.rs:58:21
+ --> $DIR/resources-cfg.rs:59:21
|
-58 | c.resources.o2;
+59 | c.resources.o2;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `o4` on type `__rtic_internal_idleResources<'_>`
- --> $DIR/resources-cfg.rs:59:21
+ --> $DIR/resources-cfg.rs:60:21
|
-59 | c.resources.o4;
+60 | c.resources.o4;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `s1` on type `__rtic_internal_idleResources<'_>`
- --> $DIR/resources-cfg.rs:60:21
+ --> $DIR/resources-cfg.rs:61:21
|
-60 | c.resources.s1;
+61 | c.resources.s1;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `s3` on type `__rtic_internal_idleResources<'_>`
- --> $DIR/resources-cfg.rs:61:21
+ --> $DIR/resources-cfg.rs:62:21
|
-61 | c.resources.s3;
+62 | c.resources.s3;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `o3` on type `__rtic_internal_uart0Resources<'_>`
- --> $DIR/resources-cfg.rs:68:21
+ --> $DIR/resources-cfg.rs:69:21
|
-68 | c.resources.o3;
+69 | c.resources.o3;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `s1` on type `__rtic_internal_uart0Resources<'_>`
- --> $DIR/resources-cfg.rs:69:21
+ --> $DIR/resources-cfg.rs:70:21
|
-69 | c.resources.s1;
+70 | c.resources.s1;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `s2` on type `__rtic_internal_uart0Resources<'_>`
- --> $DIR/resources-cfg.rs:70:21
+ --> $DIR/resources-cfg.rs:71:21
|
-70 | c.resources.s2;
+71 | c.resources.s2;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `s3` on type `__rtic_internal_uart0Resources<'_>`
- --> $DIR/resources-cfg.rs:71:21
+ --> $DIR/resources-cfg.rs:72:21
|
-71 | c.resources.s3;
+72 | c.resources.s3;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `s2` on type `__rtic_internal_uart1Resources<'_>`
- --> $DIR/resources-cfg.rs:76:21
+ --> $DIR/resources-cfg.rs:77:21
|
-76 | c.resources.s2;
+77 | c.resources.s2;
| ^^ unknown field
|
= note: available fields are: `__marker__`
error[E0609]: no field `o5` on type `__rtic_internal_uart1Resources<'_>`
- --> $DIR/resources-cfg.rs:77:21
+ --> $DIR/resources-cfg.rs:78:21
|
-77 | c.resources.o5;
+78 | c.resources.o5;
| ^^ unknown field
|
= note: available fields are: `__marker__`
diff --git a/ui/single/locals-cfg.stderr b/ui/single/locals-cfg.stderr
deleted file mode 100644
index 200cea2..0000000
--- a/ui/single/locals-cfg.stderr
+++ /dev/null
@@ -1,35 +0,0 @@
-error[E0425]: cannot find value `FOO` in this scope
- --> $DIR/locals-cfg.rs:11:9
- |
-11 | FOO;
- | ^^^ not found in this scope
-
-error[E0425]: cannot find value `FOO` in this scope
- --> $DIR/locals-cfg.rs:21:9
- |
-21 | FOO;
- | ^^^ not found in this scope
-
-error[E0425]: cannot find value `FOO` in this scope
- --> $DIR/locals-cfg.rs:31:9
- |
-31 | FOO;
- | ^^^ not found in this scope
-
-error[E0425]: cannot find value `FOO` in this scope
- --> $DIR/locals-cfg.rs:39:9
- |
-39 | FOO;
- | ^^^ not found in this scope
-
-error[E0425]: cannot find value `FOO` in this scope
- --> $DIR/locals-cfg.rs:47:9
- |
-47 | FOO;
- | ^^^ not found in this scope
-
-error: duplicate lang item in crate `panic_halt` (which `$CRATE` depends on): `panic_impl`.
- |
- = note: the lang item is first defined in crate `std` (which `$CRATE` depends on)
- = note: first definition in `std` loaded from /usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-6f77337c1826707d.rlib
- = note: second definition in `panic_halt` loaded from $DIR/target/tests/target/x86_64-unknown-linux-gnu/debug/deps/libpanic_halt-ad4cf7fac73711f1.rmeta
diff --git a/ui/single/task-priority-too-high.rs b/ui/task-priority-too-high.rs
index b1cbfa9..b1cbfa9 100644
--- a/ui/single/task-priority-too-high.rs
+++ b/ui/task-priority-too-high.rs
diff --git a/ui/single/task-priority-too-high.stderr b/ui/task-priority-too-high.stderr
index 984d3fa..984d3fa 100644
--- a/ui/single/task-priority-too-high.stderr
+++ b/ui/task-priority-too-high.stderr