aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-08-15 19:01:56 +0200
committerUlf Lilleengen <[email protected]>2025-08-25 19:44:50 +0200
commit3a6ea3a31c90179fb3cbd30c18e3a310e2ee647c (patch)
tree9dcbd98e58bd2a0569b4f30562b51c4e677ea5b9 /tests
parenta34e0b1ec57350cfa1d61aa6fc2eced077be5623 (diff)
Load all crates in the graph, honor the "publish" flag to prevent publishing examples/tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/mspm0/Cargo.toml6
-rw-r--r--tests/nrf/Cargo.toml11
-rw-r--r--tests/perf-client/Cargo.toml1
-rw-r--r--tests/perf-server/Cargo.toml1
-rw-r--r--tests/riscv32/Cargo.toml6
-rw-r--r--tests/rp/Cargo.toml7
-rw-r--r--tests/stm32/Cargo.toml34
-rw-r--r--tests/utils/Cargo.toml1
-rw-r--r--tests/utils/src/bin/saturate_serial.rs7
9 files changed, 71 insertions, 3 deletions
diff --git a/tests/mspm0/Cargo.toml b/tests/mspm0/Cargo.toml
index e4033b8b7..5cf1b0ed1 100644
--- a/tests/mspm0/Cargo.toml
+++ b/tests/mspm0/Cargo.toml
@@ -3,6 +3,7 @@ edition = "2021"
3name = "embassy-mspm0-tests" 3name = "embassy-mspm0-tests"
4version = "0.1.0" 4version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6publish = false
6 7
7[features] 8[features]
8mspm0g3507 = [ "embassy-mspm0/mspm0g3507pm" ] 9mspm0g3507 = [ "embassy-mspm0/mspm0g3507pm" ]
@@ -60,3 +61,8 @@ debug = false
60debug-assertions = false 61debug-assertions = false
61opt-level = 0 62opt-level = 0
62overflow-checks = false 63overflow-checks = false
64
65[package.metadata.embassy]
66build = [
67 { target = "thumbv6m-none-eabi", features = ["mspm0g3507"], artifact-dir = "out/tests/mspm0g3507" }
68]
diff --git a/tests/nrf/Cargo.toml b/tests/nrf/Cargo.toml
index ef7dc96ec..b94b54f4e 100644
--- a/tests/nrf/Cargo.toml
+++ b/tests/nrf/Cargo.toml
@@ -3,6 +3,7 @@ edition = "2021"
3name = "embassy-nrf-examples" 3name = "embassy-nrf-examples"
4version = "0.1.0" 4version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6publish = false
6 7
7[dependencies] 8[dependencies]
8teleprobe-meta = "1" 9teleprobe-meta = "1"
@@ -112,3 +113,13 @@ path = "src/bin/wifi_esp_hosted_perf.rs"
112required-features = [ "nrf52840",] 113required-features = [ "nrf52840",]
113 114
114# END TESTS 115# END TESTS
116
117[package.metadata.embassy]
118build = [
119 { target = "thumbv6m-none-eabi", features = ["nrf51422"], artifact-dir = "out/tests/nrf51422-dk" },
120 { target = "thumbv7em-none-eabi", features = ["nrf52832"], artifact-dir = "out/tests/nrf52832-dk" },
121 { target = "thumbv7em-none-eabi", features = ["nrf52833"], artifact-dir = "out/tests/nrf52833-dk" },
122 { target = "thumbv7em-none-eabi", features = ["nrf52840"], artifact-dir = "out/tests/nrf52840-dk" },
123 { target = "thumbv8m.main-none-eabihf", features = ["nrf5340"], artifact-dir = "out/tests/nrf5340-dk" },
124 { target = "thumbv8m.main-none-eabihf", features = ["nrf9160"], artifact-dir = "out/tests/nrf9160-dk" }
125]
diff --git a/tests/perf-client/Cargo.toml b/tests/perf-client/Cargo.toml
index e31d6361b..ea0663b6f 100644
--- a/tests/perf-client/Cargo.toml
+++ b/tests/perf-client/Cargo.toml
@@ -2,6 +2,7 @@
2name = "perf-client" 2name = "perf-client"
3version = "0.1.0" 3version = "0.1.0"
4edition = "2021" 4edition = "2021"
5publish = false
5 6
6[dependencies] 7[dependencies]
7embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4"] } 8embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4"] }
diff --git a/tests/perf-server/Cargo.toml b/tests/perf-server/Cargo.toml
index 532039050..22614a33a 100644
--- a/tests/perf-server/Cargo.toml
+++ b/tests/perf-server/Cargo.toml
@@ -2,6 +2,7 @@
2name = "perf-server" 2name = "perf-server"
3version = "0.1.0" 3version = "0.1.0"
4edition = "2021" 4edition = "2021"
5publish = false
5 6
6[dependencies] 7[dependencies]
7log = "0.4.17" 8log = "0.4.17"
diff --git a/tests/riscv32/Cargo.toml b/tests/riscv32/Cargo.toml
index 283ea5033..781fec62f 100644
--- a/tests/riscv32/Cargo.toml
+++ b/tests/riscv32/Cargo.toml
@@ -3,6 +3,7 @@ edition = "2021"
3name = "embassy-riscv-tests" 3name = "embassy-riscv-tests"
4version = "0.1.0" 4version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6publish = false
6 7
7[dependencies] 8[dependencies]
8critical-section = { version = "1.1.1", features = ["restore-state-bool"] } 9critical-section = { version = "1.1.1", features = ["restore-state-bool"] }
@@ -44,3 +45,8 @@ debug = false
44debug-assertions = false 45debug-assertions = false
45opt-level = 0 46opt-level = 0
46overflow-checks = false 47overflow-checks = false
48
49[package.metadata.embassy]
50build = [
51 { target = "riscv32imac-unknown-none-elf" }
52]
diff --git a/tests/rp/Cargo.toml b/tests/rp/Cargo.toml
index eef6c47ae..088195a75 100644
--- a/tests/rp/Cargo.toml
+++ b/tests/rp/Cargo.toml
@@ -3,6 +3,7 @@ edition = "2021"
3name = "embassy-rp-tests" 3name = "embassy-rp-tests"
4version = "0.1.0" 4version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6publish = false
6 7
7[features] 8[features]
8rp2040 = ["embassy-rp/rp2040"] 9rp2040 = ["embassy-rp/rp2040"]
@@ -92,3 +93,9 @@ debug = false
92debug-assertions = false 93debug-assertions = false
93opt-level = 0 94opt-level = 0
94overflow-checks = false 95overflow-checks = false
96
97[package.metadata.embassy]
98build = [
99 { target = "thumbv6m-none-eabi", features = ["rp2040"], artifact-dir = "out/tests/rpi-pico" },
100 { target = "thumbv8m.main-none-eabihf", features = ["rp235xb"], artifact-dir = "out/tests/pimoroni-pico-plus-2" }
101]
diff --git a/tests/stm32/Cargo.toml b/tests/stm32/Cargo.toml
index c011a6d7d..37d5161f8 100644
--- a/tests/stm32/Cargo.toml
+++ b/tests/stm32/Cargo.toml
@@ -4,6 +4,7 @@ name = "embassy-stm32-tests"
4version = "0.1.0" 4version = "0.1.0"
5license = "MIT OR Apache-2.0" 5license = "MIT OR Apache-2.0"
6autobins = false 6autobins = false
7publish = false
7 8
8[features] 9[features]
9stm32c031c6 = ["embassy-stm32/stm32c031c6", "cm0", "not-gpdma"] 10stm32c031c6 = ["embassy-stm32/stm32c031c6", "cm0", "not-gpdma"]
@@ -243,3 +244,36 @@ debug = false
243debug-assertions = false 244debug-assertions = false
244opt-level = 0 245opt-level = 0
245overflow-checks = false 246overflow-checks = false
247
248[package.metadata.embassy]
249build = [
250 { target = "thumbv7m-none-eabi", features = ["stm32f103c8"], artifact-dir = "out/tests/stm32f103c8" },
251 { target = "thumbv7em-none-eabi", features = ["stm32f429zi"], artifact-dir = "out/tests/stm32f429zi" },
252 { target = "thumbv7em-none-eabi", features = ["stm32f446re"], artifact-dir = "out/tests/stm32f446re" },
253 { target = "thumbv7em-none-eabi", features = ["stm32g491re"], artifact-dir = "out/tests/stm32g491re" },
254 { target = "thumbv6m-none-eabi", features = ["stm32g071rb"], artifact-dir = "out/tests/stm32g071rb" },
255 { target = "thumbv6m-none-eabi", features = ["stm32c031c6"], artifact-dir = "out/tests/stm32c031c6" },
256 { target = "thumbv6m-none-eabi", features = ["stm32c071rb"], artifact-dir = "out/tests/stm32c071rb" },
257 { target = "thumbv7em-none-eabi", features = ["stm32h755zi"], artifact-dir = "out/tests/stm32h755zi" },
258 { target = "thumbv7em-none-eabi", features = ["stm32h753zi"], artifact-dir = "out/tests/stm32h753zi" },
259 { target = "thumbv7em-none-eabi", features = ["stm32h7a3zi"], artifact-dir = "out/tests/stm32h7a3zi" },
260 { target = "thumbv7em-none-eabi", features = ["stm32wb55rg"], artifact-dir = "out/tests/stm32wb55rg" },
261 { target = "thumbv8m.main-none-eabihf", features = ["stm32h563zi"], artifact-dir = "out/tests/stm32h563zi" },
262 { target = "thumbv8m.main-none-eabihf", features = ["stm32u585ai"], artifact-dir = "out/tests/stm32u585ai" },
263 { target = "thumbv8m.main-none-eabihf", features = ["stm32u5a5zj"], artifact-dir = "out/tests/stm32u5a5zj" },
264 { target = "thumbv8m.main-none-eabihf", features = ["stm32wba52cg"], artifact-dir = "out/tests/stm32wba52cg" },
265 { target = "thumbv6m-none-eabi", features = ["stm32l073rz"], artifact-dir = "out/tests/stm32l073rz" },
266 { target = "thumbv7m-none-eabi", features = ["stm32l152re"], artifact-dir = "out/tests/stm32l152re" },
267 { target = "thumbv7em-none-eabi", features = ["stm32l4a6zg"], artifact-dir = "out/tests/stm32l4a6zg" },
268 { target = "thumbv7em-none-eabi", features = ["stm32l4r5zi"], artifact-dir = "out/tests/stm32l4r5zi" },
269 { target = "thumbv8m.main-none-eabihf", features = ["stm32l552ze"], artifact-dir = "out/tests/stm32l552ze" },
270 { target = "thumbv7em-none-eabi", features = ["stm32f767zi"], artifact-dir = "out/tests/stm32f767zi" },
271 { target = "thumbv7m-none-eabi", features = ["stm32f207zg"], artifact-dir = "out/tests/stm32f207zg" },
272 { target = "thumbv7em-none-eabi", features = ["stm32f303ze"], artifact-dir = "out/tests/stm32f303ze" },
273 { target = "thumbv7em-none-eabi", features = ["stm32l496zg"], artifact-dir = "out/tests/stm32l496zg" },
274 { target = "thumbv7em-none-eabi", features = ["stm32wl55jc"], artifact-dir = "out/tests/stm32wl55jc" },
275 { target = "thumbv7em-none-eabi", features = ["stm32h7s3l8"], artifact-dir = "out/tests/stm32h7s3l8" },
276 { target = "thumbv6m-none-eabi", features = ["stm32f091rc"], artifact-dir = "out/tests/stm32f091rc" },
277 { target = "thumbv8m.main-none-eabihf", features = ["stm32h503rb"], artifact-dir = "out/tests/stm32h503rb" },
278 { target = "thumbv6m-none-eabi", features = ["stm32u083rc"], artifact-dir = "out/tests/stm32u083rc" }
279]
diff --git a/tests/utils/Cargo.toml b/tests/utils/Cargo.toml
index bda55ad32..f76feaa20 100644
--- a/tests/utils/Cargo.toml
+++ b/tests/utils/Cargo.toml
@@ -2,6 +2,7 @@
2name = "test-utils" 2name = "test-utils"
3version = "0.1.0" 3version = "0.1.0"
4edition = "2021" 4edition = "2021"
5publish = false
5 6
6[dependencies] 7[dependencies]
7rand = "0.9" 8rand = "0.9"
diff --git a/tests/utils/src/bin/saturate_serial.rs b/tests/utils/src/bin/saturate_serial.rs
index 18ca12fb7..85676b106 100644
--- a/tests/utils/src/bin/saturate_serial.rs
+++ b/tests/utils/src/bin/saturate_serial.rs
@@ -2,7 +2,7 @@ use std::path::Path;
2use std::time::Duration; 2use std::time::Duration;
3use std::{env, io, process, thread}; 3use std::{env, io, process, thread};
4 4
5use rand::random; 5use rand::{rng, Rng};
6use serial::SerialPort; 6use serial::SerialPort;
7 7
8pub fn main() { 8pub fn main() {
@@ -34,14 +34,15 @@ fn saturate<T: SerialPort>(port: &mut T, idles: bool) -> io::Result<()> {
34 })?; 34 })?;
35 35
36 let mut written = 0; 36 let mut written = 0;
37 let mut rng = rng();
37 loop { 38 loop {
38 let len = random::<usize>() % 0x1000; 39 let len = rng.random_range(1..=0x1000);
39 let buf: Vec<u8> = (written..written + len).map(|x| x as u8).collect(); 40 let buf: Vec<u8> = (written..written + len).map(|x| x as u8).collect();
40 41
41 port.write_all(&buf)?; 42 port.write_all(&buf)?;
42 43
43 if idles { 44 if idles {
44 let micros = (random::<usize>() % 1000) as u64; 45 let micros = rng.random_range(1..=1000) as u64;
45 println!("Sleeping {}us", micros); 46 println!("Sleeping {}us", micros);
46 port.flush().unwrap(); 47 port.flush().unwrap();
47 thread::sleep(Duration::from_micros(micros)); 48 thread::sleep(Duration::from_micros(micros));