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

ROSCI infra for live camera testing #3094

Merged
merged 1 commit into from
May 14, 2024

Conversation

kadiredd
Copy link
Contributor

@kadiredd kadiredd commented May 8, 2024

This rosci.py module is to enable test infra for ROSCI targeting live camera testing.

  • Detects devices connected and run ROS live tests on them by means of pytest-3
  • report test results in xml format by Junit xml
  • Integrated test results xml with jenkins by JUnit utility and populate the results, analyze reports, and stats

print( 'Syntax: ' + ourname + ' [options] ' )
print( 'Options:' )
print( ' -h, --help Usage help' )
print( ' --debug Turn on debugging information (does not include LibRS debug logs; see --rslog)' )
Copy link
Contributor

Choose a reason for hiding this comment

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

@kadiredd, does the --debug param being utilized anywhere? --rslog?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

print( ' -h, --help Usage help' )
print( ' --debug Turn on debugging information (does not include LibRS debug logs; see --rslog)' )
print( ' -r, --regex Run all tests whose name matches the following regular expression' )
print( ' --device <> Run only on the specified device; list of devices separated by ',', No white spaces' )
Copy link
Contributor

Choose a reason for hiding this comment

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

@kadiredd, please also mention what happens if --device param is not passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

print( 'Options:' )
print( ' -h, --help Usage help' )
print( ' --debug Turn on debugging information (does not include LibRS debug logs; see --rslog)' )
print( ' -r, --regex Run all tests whose name matches the following regular expression' )
Copy link
Contributor

Choose a reason for hiding this comment

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

@kadiredd, please provide examples as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

if device.upper() in connected_devices:
log.i('Running tests on device:', device)
#for testname in test_list:
cmd = command(device.lower(), testname)
Copy link
Contributor

Choose a reason for hiding this comment

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

@kadiredd, will it work if we send regex directly to testname?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this regex is either full test name or keyword and the same is appended in pytest command

sys.exit( 2 )

def command(dev_name, test=None):
cmd = ['pytest-3']
Copy link
Contributor

Choose a reason for hiding this comment

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

@kadiredd, please maintain the indentation throughout the whole file. In some places its 4 spaces and in some places more than 4.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

print( 'Options:' )
print( ' -h, --help Usage help' )
print( ' -r, --regex Run all tests whose name matches the following regular expression' )
print( ' ex: --regex test_camera_imu; -r d415_basic')
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer "example:" or "e.g.,:", not "ex:"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

@SamerKhshiboun SamerKhshiboun 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 to me, only small comment..

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.

Looks like a good point to start with

@kadiredd kadiredd closed this May 14, 2024
@kadiredd
Copy link
Contributor Author

will re-open in next minute. closing and re-opening is for re-triggering the CI as I do not have permission to do that.

@kadiredd kadiredd reopened this May 14, 2024
@SamerKhshiboun SamerKhshiboun merged commit 622ea2a into IntelRealSense:ros2-development May 14, 2024
13 of 14 checks passed
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.

4 participants