Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_test_cases_fg_swupdate' into 'main'
Browse files Browse the repository at this point in the history
Fix framegrabber and swupdater module test cases

See merge request syntron/support/csr/ifm3d/ifm3d!303
  • Loading branch information
NikitaS20 committed Jun 21, 2023
2 parents f0a5605 + b04d9e2 commit ae13127
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Fixed the error reporting through onError callback

## 1.3.2 - 2023-06-16
### Added
- Add env variable IFM3D_SWUPDATE_CURL_TIMEOUT for curl transaction timeout during swupdate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ ifm3d::FrameGrabber::Impl::Run(const std::optional<json>& schema)
if (ex.code() != IFM3D_THREAD_INTERRUPTED)
{
LOG_WARNING(ex.what());
// this->ReportError(ex);
this->ReportError(ex);
error = ex;
}
}
Expand Down
12 changes: 2 additions & 10 deletions modules/swupdater/test/ifm3d-swupdater-tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,19 @@ TEST_F(SWUpdater, DetectBootMode)
auto cam = ifm3d::Device::MakeShared();
auto swu = std::make_shared<ifm3d::SWUpdater>(cam);

if (cam->AmI(ifm3d::Device::device_family::O3R))
{
/* both mode are active at the same time */
EXPECT_TRUE(swu->WaitForProductive(-1));
EXPECT_TRUE(swu->WaitForRecovery(-1));
return;
}

EXPECT_TRUE(swu->WaitForProductive(-1));
EXPECT_FALSE(swu->WaitForRecovery(-1));
EXPECT_FALSE(swu->WaitForRecovery(5000));

swu->RebootToRecovery();
EXPECT_TRUE(swu->WaitForRecovery(80000));
EXPECT_TRUE(swu->WaitForRecovery(100000));

EXPECT_FALSE(swu->WaitForProductive(-1));
EXPECT_TRUE(swu->WaitForRecovery(-1));
EXPECT_FALSE(swu->WaitForProductive(5000));

swu->RebootToProductive();
EXPECT_TRUE(swu->WaitForProductive(80000));
EXPECT_TRUE(swu->WaitForProductive(100000));

EXPECT_TRUE(swu->WaitForProductive(-1));
EXPECT_FALSE(swu->WaitForRecovery(-1));
Expand Down

0 comments on commit ae13127

Please sign in to comment.