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

[Code cleanup] Component iteration in test runners #1604

Closed
Tracked by #573
kavilla opened this issue Feb 8, 2022 · 2 comments
Closed
Tracked by #573

[Code cleanup] Component iteration in test runners #1604

kavilla opened this issue Feb 8, 2022 · 2 comments
Assignees
Labels

Comments

@kavilla
Copy link
Member

kavilla commented Feb 8, 2022

Is your feature request related to a problem? Please describe

Clean up the logic for test runners that go through the components. [EXAMPLE]

Source: #1603 (comment)

Not for this PR, but we do a similar workflow in many places and I don't love the double-select here, first pass --component name to pick a component, but then we also only want components that have a test configuration.

Describe the solution you'd like

Source: #1603 (comment)

One option would be to fail if self.args.component not in self.test_manifest.components with an explicit error, and refactor components.select to take an array of components, i.e. self.components.select(focus=self.test_manifest.components).

Another, possibly better, could be to do self.components.select(focus=self.args.component, configs=self.test_manifest.components, key: "bwc_test") that would return a set of tuples of component + configuration. The code then becomes quite clean:

for component, config in self.components.select(focus=self.args.component, configs: self.test_manifest.components, key: "bwc_test"):
   test_suite = ...
   ...

Describe alternatives you've considered

N/A

Additional context

No response

@kavilla kavilla added enhancement New Enhancement untriaged Issues that have not yet been triaged and removed untriaged Issues that have not yet been triaged labels Feb 8, 2022
@kavilla kavilla self-assigned this Feb 8, 2022
@kavilla
Copy link
Member Author

kavilla commented Feb 18, 2022

More clean up: #1512. Type new classes.

@gaiksaya
Copy link
Member

Closing this issue as stale. Don't see any action item in the PR description. Please re-open if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants