[AutoTuner] Add unit tests for parse_flow_variables and parse_tunable_variables#3965
Open
harsh-kumar-patwa wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
Open
Conversation
…_variables Add 13 unit tests covering parse_flow_variables() and parse_tunable_variables() in utils.py, resolving the TODO: Tests comments in both functions. Tests for parse_tunable_variables (7): - Return type and non-empty validation against real variables.yaml - Known tunable variables present, non-tunable excluded - Filtering logic with mock YAML data - Edge cases: empty YAML, no tunable variables Tests for parse_flow_variables (6): - Makefile failure and missing vars.tcl exit handling - Correct platform argument passed to make - env() pattern extraction from Tcl files - Variable uppercasing and deduplication Closes The-OpenROAD-Project#3964 Signed-off-by: Harsh Kumar <harshkumar3446@gmail.com>
d415ef2 to
f7d1988
Compare
Contributor
Author
|
cc @luarss @eszpotanski @maliberty I noticed that parse_flow_variables() and parse_tunable_variables() in utils.py had TODO comments asking for tests. So I created issue #3964 to track this and raised this PR to add unit tests for both functions. The tests cover return types, edge cases, error handling and variable parsing logic. Would appreciate a review when you get a chance! |
Contributor
|
@harsh-kumar-patwa Tests are failing |
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.
Summary
parse_flow_variables()andparse_tunable_variables()intools/AutoTuner/src/autotuner/utils.pyTODO: Tests.comments from both functionsTest Coverage
parse_tunable_variables()(7 tests): return type, non-empty, known tunable vars present, non-tunable excluded, filtering with mock YAML, empty YAML, no tunable variablesparse_flow_variables()(6 tests): Makefile failure exit, missing vars.tcl exit, platform argument validation, env() pattern extraction, uppercase normalization, deduplicationTest Plan
pytest test/parse_test.py -v)Closes #3964