sim: Test variants of single upgrade with multi-image
Test the variations of the situation where we are built for multi-image, but are only upgrading a single image, including no dependencies, correct dependencies, and unmet dependencies. Signed-off-by: David Brown <david.brown@linaro.org> Signed-off-by: Fabio Utzig <utzig@apache.org>
This commit is contained in:
parent
e6ab34c367
commit
e4576b888c
|
@ -66,7 +66,7 @@ test_shell!(dependency_combos, r, {
|
||||||
|
|
||||||
/// These are the variants of dependencies we will test.
|
/// These are the variants of dependencies we will test.
|
||||||
pub static TEST_DEPS: &[DepTest] = &[
|
pub static TEST_DEPS: &[DepTest] = &[
|
||||||
// First is a sanity test, no dependencies should upgrade.
|
// A sanity test, no dependencies should upgrade.
|
||||||
DepTest {
|
DepTest {
|
||||||
depends: [DepType::Nothing, DepType::Nothing],
|
depends: [DepType::Nothing, DepType::Nothing],
|
||||||
upgrades: [UpgradeInfo::Upgraded, UpgradeInfo::Upgraded],
|
upgrades: [UpgradeInfo::Upgraded, UpgradeInfo::Upgraded],
|
||||||
|
@ -98,6 +98,43 @@ pub static TEST_DEPS: &[DepTest] = &[
|
||||||
upgrades: [UpgradeInfo::Held, UpgradeInfo::Held],
|
upgrades: [UpgradeInfo::Held, UpgradeInfo::Held],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Test where only the first image is upgraded, and there are no
|
||||||
|
// dependencies.
|
||||||
|
DepTest {
|
||||||
|
depends: [DepType::Nothing, DepType::NoUpgrade],
|
||||||
|
upgrades: [UpgradeInfo::Upgraded, UpgradeInfo::Held],
|
||||||
|
},
|
||||||
|
|
||||||
|
// Test one image with a valid dependency on the first image.
|
||||||
|
DepTest {
|
||||||
|
depends: [DepType::OldCorrect, DepType::NoUpgrade],
|
||||||
|
upgrades: [UpgradeInfo::Upgraded, UpgradeInfo::Held],
|
||||||
|
},
|
||||||
|
|
||||||
|
// Test one image with an invalid dependency on the first image.
|
||||||
|
DepTest {
|
||||||
|
depends: [DepType::Newer, DepType::NoUpgrade],
|
||||||
|
upgrades: [UpgradeInfo::Held, UpgradeInfo::Held],
|
||||||
|
},
|
||||||
|
|
||||||
|
// Test where only the second image is upgraded, and there are no
|
||||||
|
// dependencies.
|
||||||
|
DepTest {
|
||||||
|
depends: [DepType::NoUpgrade, DepType::Nothing],
|
||||||
|
upgrades: [UpgradeInfo::Held, UpgradeInfo::Upgraded],
|
||||||
|
},
|
||||||
|
|
||||||
|
// Test one image with a valid dependency on the second image.
|
||||||
|
DepTest {
|
||||||
|
depends: [DepType::NoUpgrade, DepType::OldCorrect],
|
||||||
|
upgrades: [UpgradeInfo::Held, UpgradeInfo::Upgraded],
|
||||||
|
},
|
||||||
|
|
||||||
|
// Test one image with an invalid dependency on the second image.
|
||||||
|
DepTest {
|
||||||
|
depends: [DepType::NoUpgrade, DepType::Newer],
|
||||||
|
upgrades: [UpgradeInfo::Held, UpgradeInfo::Held],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
/// Counter for the image number.
|
/// Counter for the image number.
|
||||||
|
|
Loading…
Reference in New Issue