Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wheel odometry unit test fix #4830

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions unit-tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ add_custom_command(TARGET live-test POST_BUILD
${Deployment_Location}
)

# copy wheel odometry calibration file to build folder
add_custom_command(TARGET live-test POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/resources/calibration_odometry.json
${CMAKE_CURRENT_BINARY_DIR}/calibration_odometry.json
)

#Post-Processing data set for unit-tests
#message(STATUS "Post processing deployment directory=${Deployment_Location}")
list(APPEND PP_Tests_List 1551257764229 # D415_DS(2)
Expand Down
3 changes: 1 addition & 2 deletions unit-tests/unit-tests-live.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5548,7 +5548,6 @@ TEST_CASE("Wheel_Odometry_API", "[live]")
REQUIRE(profile);
REQUIRE_NOTHROW(dev = profile.get_device());
REQUIRE(dev);
disable_sensitive_options_for(dev);
dev_type PID = get_PID(dev);
CAPTURE(PID.first);

Expand All @@ -5570,7 +5569,7 @@ TEST_CASE("Wheel_Odometry_API", "[live]")
THEN("Load wheel odometry calibration")
{
std::ifstream calibrationFile("calibration_odometry.json");
if (calibrationFile)
REQUIRE(calibrationFile);
{
const std::string json_str((std::istreambuf_iterator<char>(calibrationFile)),
std::istreambuf_iterator<char>());
Expand Down