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.
@@ -66,7 +66,7 @@ test_shell!(dependency_combos, r, {
/// These are the variants of dependencies we will test.
pub static TEST_DEPS: &[DepTest] = &[
- // First is a sanity test, no dependencies should upgrade.
+ // A sanity test, no dependencies should upgrade.
DepTest {
depends: [DepType::Nothing, DepType::Nothing],
upgrades: [UpgradeInfo::Upgraded, UpgradeInfo::Upgraded],
@@ -98,6 +98,43 @@ pub static TEST_DEPS: &[DepTest] = &[
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.
