Add unit tests for genRuleFile.py#4072
Open
rohithsiddi wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
Open
Add unit tests for genRuleFile.py#4072rohithsiddi wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
rohithsiddi wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
Conversation
Signed-off-by: rohithsiddi <rohithsiddi7@gmail.com>
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.
flow/util/genRuleFile.pyis the most actively maintained Python utility in the repo and is used in CI via theupdate_rulesMakefile targets. Despite this, it had zero test coverage. This PR adds 30 unit tests covering all rule calculation modes and edge cases.Changes
flow/test/test_genRuleFile.py: new test file with 30 tests across two classesCoverage
comma_separated_list()argument parser helperdirect,padding,period_padding,metricround_value: trueproducesint,falseproducesfloat)*flow__warnings__count:*)--tighten,--failing,--updatemodesmetrics_to_considerfiltering (preserves old rules for unlisted metrics)max(rule_value, metric * 1.1))min_maxwithmin_max_directoptionTest plan
cd flow/test && python3 test_genRuleFile.py -v(30/30 pass)test_convertDrc.py(7 tests)test_def2stream.py(14 tests)test_genElapsedTime.py(5 tests)test_generate_klayout_tech.py(13 tests)