Skip to content

add test-dds-adapter-depth test - #13605

Merged
maloel merged 6 commits into
realsenseai:developmentfrom
maloel:development
Jan 6, 2025
Merged

add test-dds-adapter-depth test#13605
maloel merged 6 commits into
realsenseai:developmentfrom
maloel:development

Conversation

@maloel

@maloel maloel commented Dec 12, 2024

Copy link
Copy Markdown
Contributor

Adds basic streaming test for rs-dds-adapter.

Moved the librs library from dds-specific code to rspy, so other tests can use it.

Tracked on [LRS-1217]

@maloel maloel added ci CI-related: does not change library behavior dds labels Dec 12, 2024
@maloel
maloel requested a review from OhadMeir December 12, 2024 17:04
@OhadMeir

Copy link
Copy Markdown
Contributor

Moved the librs library from dds-specific code to rspy, so other tests can use it.

I am not sure librs is the appropriate name for this in rspy scope. Was named librs because it was a helper to test librealsense DDS capabilities (also testing realdds in same tests folder). Maybe incorporate it into devices.py?
What do you think?

@OhadMeir OhadMeir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thought about it, we have a live/tools unit test folder. I think the adapter test should be there. Maybe under an internal dds folder

@maloel

maloel commented Dec 15, 2024

Copy link
Copy Markdown
Contributor Author

Moved the librs library from dds-specific code to rspy, so other tests can use it.

I am not sure librs is the appropriate name for this in rspy scope. Was named librs because it was a helper to test librealsense DDS capabilities (also testing realdds in same tests folder). Maybe incorporate it into devices.py? What do you think?

It's librealsense, with everything that it has, plus some additions for unit-testing (but not for dds). Has nothing to do with dds.

@maloel

maloel commented Dec 15, 2024

Copy link
Copy Markdown
Contributor Author

Thought about it, we have a live/tools unit test folder. I think the adapter test should be there. Maybe under an internal dds folder

I don't agree: everything for dds should be under dds. The 'live' folder is not always right, and using it to group things does not always make sense. That's why we have --live and --not-live as switches for run-unit-tests. It was a good grouping at the time, but it's no longer needed.

If you insist, I'll change.

@OhadMeir

Copy link
Copy Markdown
Contributor

Thought about it, we have a live/tools unit test folder. I think the adapter test should be there. Maybe under an internal dds folder

I don't agree: everything for dds should be under dds. The 'live' folder is not always right, and using it to group things does not always make sense. That's why we have --live and --not-live as switches for run-unit-tests. It was a good grouping at the time, but it's no longer needed.

If you insist, I'll change.

This test should fail if no USB camera is attached. How is it marked to run only with live cameras now?

@maloel

maloel commented Dec 15, 2024

Copy link
Copy Markdown
Contributor Author

Thought about it, we have a live/tools unit test folder. I think the adapter test should be there. Maybe under an internal dds folder

I don't agree: everything for dds should be under dds. The 'live' folder is not always right, and using it to group things does not always make sense. That's why we have --live and --not-live as switches for run-unit-tests. It was a good grouping at the time, but it's no longer needed.
If you insist, I'll change.

This test should fail if no USB camera is attached. How is it marked to run only with live cameras now?

--live does not check the tag or folder - it checks whether it has a test:device directive in it.

@maloel

maloel commented Dec 16, 2024

Copy link
Copy Markdown
Contributor Author

--live does not check the tag or folder - it checks whether it has a test:device directive in it.

Not sure you saw this... I got no email...

@OhadMeir

Copy link
Copy Markdown
Contributor

OK if --live is looking for device directive, but I don't see that your test is running. It is skipped both for GHA and LibCI.

@maloel

maloel commented Dec 18, 2024

Copy link
Copy Markdown
Contributor Author

I don't see that your test is running

Good catch.
The reason is that this test is live and DDS at the same time, and we have no setup that runs both together...
We have to make LibCI compile DDS (possibly only on nightly?) @Nir-Az any preference?

@Nir-Az

Nir-Az commented Dec 18, 2024

Copy link
Copy Markdown
Collaborator

I don't see that your test is running

Good catch. The reason is that this test is live and DDS at the same time, and we have no setup that runs both together... We have to make LibCI compile DDS (possibly only on nightly?) @Nir-Az any preference?

Did a test run, build time increase from 36 [m] to 45[m]
For nightly only it's OK

1 thing I am not sure from the code is if dds on will run only non live test or both live and not live?

@maloel

maloel commented Dec 18, 2024

Copy link
Copy Markdown
Contributor Author

1 thing I am not sure from the code is if dds on will run only non live test or both live and not live?

I will make it so that, on nightly only, LibCI will compile DDS. This will be a configuration in Jenkins.
This will also cause the nightly to run all tests -- not just live -- i.e., including DDS -- and this test would then run.

@maloel

maloel commented Jan 3, 2025

Copy link
Copy Markdown
Contributor Author

I had a lot of trouble - the adapter test failed in LibCI under Jenkins, and Dima could not help. It turns out that the std::cin.ignore( ... ) code doesn't work under jenkins: cin reports it's at EOF and the adapter quits right away.

To get around this, I implemented proper Control-C handling in Windows/Linux and added it to rsutils.

You can see the run here:
https://rsjenkins.iil.intel.com/job/LRS_libci_pipeline/9859/

Comment thread third-party/rsutils/include/rsutils/concurrency/event.h
Comment thread third-party/rsutils/include/rsutils/concurrency/event.h
Comment thread unit-tests/dds/adapter/test-depth.py
@OhadMeir

OhadMeir commented Jan 5, 2025

Copy link
Copy Markdown
Contributor

I will make it so that, on nightly only, LibCI will compile DDS. This will be a configuration in Jenkins. This will also cause the nightly to run all tests -- not just live -- i.e., including DDS -- and this test would then run.

Is this handled?

@maloel

maloel commented Jan 6, 2025

Copy link
Copy Markdown
Contributor Author

I will make it so that, on nightly only, LibCI will compile DDS. This will be a configuration in Jenkins. This will also cause the nightly to run all tests -- not just live -- i.e., including DDS -- and this test would then run.

Is this handled?

As soon as the PR is in. It's a change in Jenkins.

@maloel
maloel merged commit 220d03d into realsenseai:development Jan 6, 2025
@maloel
maloel deleted the development branch January 6, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI-related: does not change library behavior dds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants