diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mspm0/Cargo.toml | 6 | ||||
| -rw-r--r-- | tests/nrf/Cargo.toml | 11 | ||||
| -rw-r--r-- | tests/perf-client/Cargo.toml | 1 | ||||
| -rw-r--r-- | tests/perf-server/Cargo.toml | 1 | ||||
| -rw-r--r-- | tests/riscv32/Cargo.toml | 6 | ||||
| -rw-r--r-- | tests/rp/Cargo.toml | 7 | ||||
| -rw-r--r-- | tests/stm32/Cargo.toml | 34 | ||||
| -rw-r--r-- | tests/utils/Cargo.toml | 1 | ||||
| -rw-r--r-- | tests/utils/src/bin/saturate_serial.rs | 7 |
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" | |||
| 3 | name = "embassy-mspm0-tests" | 3 | name = "embassy-mspm0-tests" |
| 4 | version = "0.1.0" | 4 | version = "0.1.0" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | publish = false | ||
| 6 | 7 | ||
| 7 | [features] | 8 | [features] |
| 8 | mspm0g3507 = [ "embassy-mspm0/mspm0g3507pm" ] | 9 | mspm0g3507 = [ "embassy-mspm0/mspm0g3507pm" ] |
| @@ -60,3 +61,8 @@ debug = false | |||
| 60 | debug-assertions = false | 61 | debug-assertions = false |
| 61 | opt-level = 0 | 62 | opt-level = 0 |
| 62 | overflow-checks = false | 63 | overflow-checks = false |
| 64 | |||
| 65 | [package.metadata.embassy] | ||
| 66 | build = [ | ||
| 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" | |||
| 3 | name = "embassy-nrf-examples" | 3 | name = "embassy-nrf-examples" |
| 4 | version = "0.1.0" | 4 | version = "0.1.0" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | publish = false | ||
| 6 | 7 | ||
| 7 | [dependencies] | 8 | [dependencies] |
| 8 | teleprobe-meta = "1" | 9 | teleprobe-meta = "1" |
| @@ -112,3 +113,13 @@ path = "src/bin/wifi_esp_hosted_perf.rs" | |||
| 112 | required-features = [ "nrf52840",] | 113 | required-features = [ "nrf52840",] |
| 113 | 114 | ||
| 114 | # END TESTS | 115 | # END TESTS |
| 116 | |||
| 117 | [package.metadata.embassy] | ||
| 118 | build = [ | ||
| 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 @@ | |||
| 2 | name = "perf-client" | 2 | name = "perf-client" |
| 3 | version = "0.1.0" | 3 | version = "0.1.0" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | publish = false | ||
| 5 | 6 | ||
| 6 | [dependencies] | 7 | [dependencies] |
| 7 | embassy-net = { version = "0.7.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4"] } | 8 | embassy-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 @@ | |||
| 2 | name = "perf-server" | 2 | name = "perf-server" |
| 3 | version = "0.1.0" | 3 | version = "0.1.0" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | publish = false | ||
| 5 | 6 | ||
| 6 | [dependencies] | 7 | [dependencies] |
| 7 | log = "0.4.17" | 8 | log = "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" | |||
| 3 | name = "embassy-riscv-tests" | 3 | name = "embassy-riscv-tests" |
| 4 | version = "0.1.0" | 4 | version = "0.1.0" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | publish = false | ||
| 6 | 7 | ||
| 7 | [dependencies] | 8 | [dependencies] |
| 8 | critical-section = { version = "1.1.1", features = ["restore-state-bool"] } | 9 | critical-section = { version = "1.1.1", features = ["restore-state-bool"] } |
| @@ -44,3 +45,8 @@ debug = false | |||
| 44 | debug-assertions = false | 45 | debug-assertions = false |
| 45 | opt-level = 0 | 46 | opt-level = 0 |
| 46 | overflow-checks = false | 47 | overflow-checks = false |
| 48 | |||
| 49 | [package.metadata.embassy] | ||
| 50 | build = [ | ||
| 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" | |||
| 3 | name = "embassy-rp-tests" | 3 | name = "embassy-rp-tests" |
| 4 | version = "0.1.0" | 4 | version = "0.1.0" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | publish = false | ||
| 6 | 7 | ||
| 7 | [features] | 8 | [features] |
| 8 | rp2040 = ["embassy-rp/rp2040"] | 9 | rp2040 = ["embassy-rp/rp2040"] |
| @@ -92,3 +93,9 @@ debug = false | |||
| 92 | debug-assertions = false | 93 | debug-assertions = false |
| 93 | opt-level = 0 | 94 | opt-level = 0 |
| 94 | overflow-checks = false | 95 | overflow-checks = false |
| 96 | |||
| 97 | [package.metadata.embassy] | ||
| 98 | build = [ | ||
| 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" | |||
| 4 | version = "0.1.0" | 4 | version = "0.1.0" |
| 5 | license = "MIT OR Apache-2.0" | 5 | license = "MIT OR Apache-2.0" |
| 6 | autobins = false | 6 | autobins = false |
| 7 | publish = false | ||
| 7 | 8 | ||
| 8 | [features] | 9 | [features] |
| 9 | stm32c031c6 = ["embassy-stm32/stm32c031c6", "cm0", "not-gpdma"] | 10 | stm32c031c6 = ["embassy-stm32/stm32c031c6", "cm0", "not-gpdma"] |
| @@ -243,3 +244,36 @@ debug = false | |||
| 243 | debug-assertions = false | 244 | debug-assertions = false |
| 244 | opt-level = 0 | 245 | opt-level = 0 |
| 245 | overflow-checks = false | 246 | overflow-checks = false |
| 247 | |||
| 248 | [package.metadata.embassy] | ||
| 249 | build = [ | ||
| 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 @@ | |||
| 2 | name = "test-utils" | 2 | name = "test-utils" |
| 3 | version = "0.1.0" | 3 | version = "0.1.0" |
| 4 | edition = "2021" | 4 | edition = "2021" |
| 5 | publish = false | ||
| 5 | 6 | ||
| 6 | [dependencies] | 7 | [dependencies] |
| 7 | rand = "0.9" | 8 | rand = "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; | |||
| 2 | use std::time::Duration; | 2 | use std::time::Duration; |
| 3 | use std::{env, io, process, thread}; | 3 | use std::{env, io, process, thread}; |
| 4 | 4 | ||
| 5 | use rand::random; | 5 | use rand::{rng, Rng}; |
| 6 | use serial::SerialPort; | 6 | use serial::SerialPort; |
| 7 | 7 | ||
| 8 | pub fn main() { | 8 | pub 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)); |
