diff options
| author | sander <[email protected]> | 2023-04-20 10:56:59 +0200 |
|---|---|---|
| committer | sander <[email protected]> | 2023-04-20 10:56:59 +0200 |
| commit | a73f9474a0dc4af1ebfb22d7960e6c4b3aca81bd (patch) | |
| tree | c39b55c66f8c9f65e17aabb2f70b964e9dcb9e0a | |
| parent | 3bf41e9a06bab1b48b08fbc0b8f10d00b47b936e (diff) | |
embassy-boot: ensure tests can run on the stable compiler
| -rw-r--r-- | .github/workflows/rust.yml | 2 | ||||
| -rw-r--r-- | embassy-boot/boot/src/firmware_updater.rs | 1 | ||||
| -rw-r--r-- | embassy-boot/boot/src/lib.rs | 8 |
3 files changed, 6 insertions, 5 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b8af7fcc9..79354fe70 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml | |||
| @@ -71,7 +71,7 @@ jobs: | |||
| 71 | 71 | ||
| 72 | - name: Test boot | 72 | - name: Test boot |
| 73 | working-directory: ./embassy-boot/boot | 73 | working-directory: ./embassy-boot/boot |
| 74 | run: cargo test --features nightly && cargo test --features "ed25519-dalek,nightly" && cargo test --features "ed25519-salty,nightly" | 74 | run: cargo test && cargo test --features nightly && cargo test --features "ed25519-dalek,nightly" && cargo test --features "ed25519-salty,nightly" |
| 75 | 75 | ||
| 76 | - name: Test sync | 76 | - name: Test sync |
| 77 | working-directory: ./embassy-sync | 77 | working-directory: ./embassy-sync |
diff --git a/embassy-boot/boot/src/firmware_updater.rs b/embassy-boot/boot/src/firmware_updater.rs index 1f2a6d24e..92987825f 100644 --- a/embassy-boot/boot/src/firmware_updater.rs +++ b/embassy-boot/boot/src/firmware_updater.rs | |||
| @@ -520,6 +520,7 @@ mod tests { | |||
| 520 | use crate::mem_flash::MemFlash; | 520 | use crate::mem_flash::MemFlash; |
| 521 | 521 | ||
| 522 | #[test] | 522 | #[test] |
| 523 | #[cfg(feature = "nightly")] | ||
| 523 | fn can_verify_sha1() { | 524 | fn can_verify_sha1() { |
| 524 | const STATE: Partition = Partition::new(0, 4096); | 525 | const STATE: Partition = Partition::new(0, 4096); |
| 525 | const DFU: Partition = Partition::new(65536, 131072); | 526 | const DFU: Partition = Partition::new(65536, 131072); |
diff --git a/embassy-boot/boot/src/lib.rs b/embassy-boot/boot/src/lib.rs index e268d8883..8eb3ba96d 100644 --- a/embassy-boot/boot/src/lib.rs +++ b/embassy-boot/boot/src/lib.rs | |||
| @@ -83,7 +83,7 @@ mod tests { | |||
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | #[test] | 85 | #[test] |
| 86 | #[cfg(not(feature = "_verify"))] | 86 | #[cfg(all(feature = "nightly", not(feature = "_verify")))] |
| 87 | fn test_swap_state() { | 87 | fn test_swap_state() { |
| 88 | const STATE: Partition = Partition::new(0, 4096); | 88 | const STATE: Partition = Partition::new(0, 4096); |
| 89 | const ACTIVE: Partition = Partition::new(4096, 61440); | 89 | const ACTIVE: Partition = Partition::new(4096, 61440); |
| @@ -136,7 +136,7 @@ mod tests { | |||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | #[test] | 138 | #[test] |
| 139 | #[cfg(not(feature = "_verify"))] | 139 | #[cfg(all(feature = "nightly", not(feature = "_verify")))] |
| 140 | fn test_separate_flash_active_page_biggest() { | 140 | fn test_separate_flash_active_page_biggest() { |
| 141 | const STATE: Partition = Partition::new(2048, 4096); | 141 | const STATE: Partition = Partition::new(2048, 4096); |
| 142 | const ACTIVE: Partition = Partition::new(4096, 16384); | 142 | const ACTIVE: Partition = Partition::new(4096, 16384); |
| @@ -173,7 +173,7 @@ mod tests { | |||
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | #[test] | 175 | #[test] |
| 176 | #[cfg(not(feature = "_verify"))] | 176 | #[cfg(all(feature = "nightly", not(feature = "_verify")))] |
| 177 | fn test_separate_flash_dfu_page_biggest() { | 177 | fn test_separate_flash_dfu_page_biggest() { |
| 178 | const STATE: Partition = Partition::new(2048, 4096); | 178 | const STATE: Partition = Partition::new(2048, 4096); |
| 179 | const ACTIVE: Partition = Partition::new(4096, 16384); | 179 | const ACTIVE: Partition = Partition::new(4096, 16384); |
| @@ -212,7 +212,7 @@ mod tests { | |||
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | #[test] | 214 | #[test] |
| 215 | #[cfg(feature = "_verify")] | 215 | #[cfg(all(feature = "nightly", feature = "_verify"))] |
| 216 | fn test_verify() { | 216 | fn test_verify() { |
| 217 | // The following key setup is based on: | 217 | // The following key setup is based on: |
| 218 | // https://docs.rs/ed25519-dalek/latest/ed25519_dalek/#example | 218 | // https://docs.rs/ed25519-dalek/latest/ed25519_dalek/#example |
