Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

OTA-2540: Print installed and pending version on Secondary #1201

Merged
merged 1 commit into from
May 6, 2019

Conversation

mike-sul
Copy link
Collaborator

@mike-sul mike-sul commented May 6, 2019

Print currently installed and pending image versions on secondary ECUs

Signed-off-by: Mike Sul ext-mykhaylo.sul@here.com

@mike-sul mike-sul force-pushed the test/OTA-2540/ipsecondary-integration-test branch from 0391fa4 to 349b413 Compare May 6, 2019 14:59
Copy link
Collaborator

@pattivacek pattivacek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for the minor complaint.

std::cout << " undetermined image version\n";
} else {
if (installed_targets.size() > current_version) {
std::cout << " installed image version: " << installed_targets[current_version].sha256Hash() << "\n";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest saying "hash" instead of "version" for clarity -- version usually means something else in this context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

db_storage_->clearEcuSerials();
db_storage_->storeEcuSerials(
{{Uptane::EcuSerial(primary_ecu_serial), Uptane::HardwareIdentifier(primary_ecu_id)},
{Uptane::EcuSerial(secondary_ecu_serial), Uptane::HardwareIdentifier(secondary_ecu_id)}});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for the negative test too!

…lename on secondary ECUs

Signed-off-by: Mike Sul <ext-mykhaylo.sul@here.com>
@mike-sul mike-sul force-pushed the test/OTA-2540/ipsecondary-integration-test branch from 349b413 to 451d2cb Compare May 6, 2019 15:43
Copy link
Collaborator

@pattivacek pattivacek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mike-sul mike-sul merged commit 32d3882 into master May 6, 2019
@pattivacek pattivacek deleted the test/OTA-2540/ipsecondary-integration-test branch May 7, 2019 07:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants