-
Notifications
You must be signed in to change notification settings - Fork 32
Add option to run tests in parallel (as default) #1109
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
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,3 +9,5 @@ Tests/kaas/kaas-sonobuoy-tests/results/ | |
| *.tar.gz | ||
| .direnv | ||
| .vscode | ||
| Tests/sono-* | ||
| report.yaml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,7 +90,7 @@ def __init__(self): | |
| self.verbose = False | ||
| self.quiet = False | ||
| self.subject = "" | ||
| self.assignment = {} | ||
| self.assignment = { "e2e-parallel" : "--e2e-parallel=true" } | ||
| self.checkdate = datetime.date.today() | ||
| self.version = None | ||
| self.output = None | ||
|
|
@@ -135,7 +135,7 @@ def apply_argv(self, argv): | |
| self.critical_only = True | ||
| elif opt[0] == "-a" or opt[0] == "--assign": | ||
| key, value = opt[1].split("=", 1) | ||
| if key in self.assignment: | ||
| if key in self.assignment and key != "e2e-parallel": | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't really understand why this check needs to be done. In which cases would:
|
||
| raise ValueError(f"Double assignment for {key!r}") | ||
| self.assignment[key] = value | ||
| elif opt[0] == "-t" or opt[0] == "--tests": | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the place for defaults, because this script is agnostic of the actual tests (it works the same for iaas and kaas). If we want defaults, we have to place them in the respective yaml file, and that means we have to add this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah interesting! Haven't really noticed this, but now that you mention it: what was the rational to test k8s and openstack with one script? Imho this adds an unnecessary level of complexity here (which made it quite hard for me to add this simple param). If I think about the discussion for #1100, adding one binary was considered too much there.
Also, why is this not a place for defaults? I saw things like
self.quiet = Falseorself.critical_only = Falsewhich looked like reasonable defaults to me. Parallel execution could/should be done in k8s and in OS envs, right?I don't really see the way forward now, to make this happen by default and be configurable. Could you point me to something acceptable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's like saying "why are we listing two directories with the same command
ls"?This script can run any test suite, and the test suite must be given via a yaml file.