Skip to content

Conversation

qa-cea
Copy link
Collaborator

@qa-cea qa-cea commented Aug 27, 2025

This commit replace the '*.sh' iterator with a method which lookup every file with the execution permission inside the 'tests' folder of a Rift package. This allow any kind to be ran : shell, Python, binary...

This commit replace the '*.sh' iterator with a method which lookup
every file with the execution permission inside the 'tests' folder
of a Rift package. This allow any kind to be ran : shell, Python, binary...
@qa-cea qa-cea requested a review from valeriyoann August 27, 2025 13:25
@qa-cea
Copy link
Collaborator Author

qa-cea commented Aug 28, 2025

Comments from Gerrit change 14688 were taken into account

logging.info('%s not found, this package has no custom tests', self.testsdir)
return

for filepath in os.scandir(self.testsdir):
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest: handling tests in sub-directories would be nice too, in case that ever happens. A simple recursive call should be enough.

return

for filepath in os.scandir(self.testsdir):
if os.access(filepath, os.X_OK):
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: if for any reason there are sub-directories, this condition will most likely be valid, as most directories as execution rights

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