Begin adding support for shared resources in multi-slot test stations#8
Merged
jonny12375 merged 13 commits intohalter-modsfrom Apr 9, 2025
Merged
Conversation
Author
Allow PlugManager to be explicitly created and provided to the test, thereby also allowing explicit plug construction which allows for complex construction.
The swapping out of the loggers is not threadsafe.
eb58fc7 to
fc07e53
Compare
thealastair
commented
Apr 4, 2025
| return _ExecutorReturn.CONTINUE | ||
|
|
||
| outcome = self.phase_executor.evaluate_checkpoint(checkpoint, subtest_rec) | ||
| def _execute_children(self, child_runner: phase_child_runner.ChildRunnerPhase, |
Author
There was a problem hiding this comment.
+1000 points for function name
thealastair
commented
Apr 4, 2025
test/test_state_test.py
Outdated
| 'diagnosers': [], | ||
| 'diagnoses': [], | ||
| 'log_records': [], | ||
| 'test_uid': 'testing-123', |
Author
There was a problem hiding this comment.
Debug code? or guaranteed to be overwritten?
thealastair
commented
Apr 4, 2025
openhtf/core/test_executor.py
Outdated
Comment on lines
413
to
417
| while any([not t.state.is_finalized if t.state is not None else False for t in tests]): | ||
| time.sleep(0.1) | ||
|
|
||
| for thread in execution_threads: | ||
| thread.join() |
Author
There was a problem hiding this comment.
Wh
Suggested change
| while any([not t.state.is_finalized if t.state is not None else False for t in tests]): | |
| time.sleep(0.1) | |
| for thread in execution_threads: | |
| thread.join() | |
| for thread in execution_threads: | |
| thread.join() |
thealastair
commented
Apr 4, 2025
openhtf/core/test_record.py
Outdated
| diagnoses = attr.ib(type=List['diagnoses_lib.Diagnosis'], factory=list) | ||
| log_records = attr.ib(type=List[logs.LogRecord], factory=list) | ||
| marginal = attr.ib(type=Optional[bool], default=None) | ||
| test_uid = attr.ib(type=Optional[Text], default=None) |
Author
There was a problem hiding this comment.
Why is this optional? Feels fairly non-optional?
thealastair
commented
Apr 4, 2025
| run_phases_with_profiling: bool): | ||
| run_phases_with_profiling: bool, | ||
| plug_manager: Optional[PlugManager] = None): | ||
| super(TestExecutor, self).__init__(name='TestExecutorThread') |
Author
There was a problem hiding this comment.
Would there be any value in adding the "slot id" in so that it can be in the thread name? Maybe only useful for debug?
dd1cedb to
f702d6c
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Allow PlugManager to be explicitly created and provided to the test, thereby also allowing explicit plug construction which allows for complex construction.