Skip to content

Conversation

@maloel
Copy link
Contributor

@maloel maloel commented Dec 8, 2022

  • enable run-unit-tests without pyrealsense2 (when only pyrsutils is present, for example)
  • added rspy.test.check_false() and .check_throws()
  • add version to pyrsutils
  • use pyrsutils.version in LibCI:
    • remove rspy.repo.compare_fw_versions() and .pretty_fw_version()
    • remove rsutils/string/test-sw-update-ver.cpp test in favor of rsutils/test-version.py

Note:
A small side-effect of this is that FW versions that were previously expressed as 05.14.00.00 will now be 5.14.0 (the last number is omitted when 0). I've tested a bit (including FW downgrade and upgrade, with rs-fw-update and viewer) and found no issue...

@maloel maloel marked this pull request as ready for review December 8, 2022 14:25
@maloel maloel requested a review from Nir-Az December 8, 2022 14:26
test.check( v2.is_between( v1, v3 ))
test.check( v3.is_between( v1, v3 ))
test.check( v2.is_between( v2, v3 ))
test.check( v2.is_between( v2, v2 ))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to add a state when is_between() failed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, I just took your code from the .cpp :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh :)

test.check( not version( 0x100, 0xFFFF, 0xFF, 0xFFFFFFFF ))
test.check( not version( 0xFF, 0x10000, 0xFF, 0xFFFFFFFF ))
test.check( not version( 0xFF, 0xFFFF, 0x100, 0xFFFFFFFF ))
#test.check( not version( 0xFF, 0xFFFF, 0xFF, 0x100000000 )) Python throws - type error
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checks the limits

{
unsigned major = 0;
char const * ptr = base;
while( *ptr != '.' )
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add protection from nullptr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Killjoy...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

Copy link
Collaborator

@Nir-Az Nir-Az left a comment

Choose a reason for hiding this comment

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

LGTM

@maloel maloel merged commit 5b71448 into realsenseai:development Dec 13, 2022
@maloel maloel deleted the libci branch December 13, 2022 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants