-
Notifications
You must be signed in to change notification settings - Fork 25
New feature and enhancement: Test titles, descriptions, tags and generics #68
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
base: dev
Are you sure you want to change the base?
Changes from all commits
2519035
070c949
2839c0c
27957c9
7fdb0a8
2943268
1c1813b
ef4a093
1a4fc1a
cb07d0e
0f28da7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1266,9 +1266,11 @@ proc AfterSimulateReports {} { | |||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| WriteTestCaseSettingsYaml $TestCaseSettingsFile | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # FinishSimulateBuildYaml computes ElapsedTime and writes it to build YAML. | ||||||||||||||||||||||||||||
| # It also appends ElapsedTime into the per-test *_run.yml so per-test HTML can display it. | ||||||||||||||||||||||||||||
| FinishSimulateBuildYaml | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| Simulate2Html $TestCaseSettingsFile | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| FinishSimulateBuildYaml | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
|
|
@@ -1418,6 +1420,128 @@ proc TestSuite {SuiteName} { | |||||||||||||||||||||||||||
| # CreateDirectory [file join ${::osvvm::CurrentSimulationDirectory} ${::osvvm::ResultsDirectory} ${TestSuiteName}] | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # SetTestSuiteDescription | ||||||||||||||||||||||||||||
| # Sets a suite-level description which is written into the build YAML | ||||||||||||||||||||||||||||
| # and displayed in the HTML "Test Suite Summary" Description column. | ||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||
| # Call this after TestSuite <name> and before the suite finishes. | ||||||||||||||||||||||||||||
| proc SetTestSuiteDescription {Description} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestSuiteDescription $Description | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # ClearTestSuiteDescription | ||||||||||||||||||||||||||||
| # Clears any previously set suite-level description. | ||||||||||||||||||||||||||||
| proc ClearTestSuiteDescription {} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestSuiteDescription "" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # GetTestSuiteDescription | ||||||||||||||||||||||||||||
| # Returns the currently configured suite-level description. | ||||||||||||||||||||||||||||
| proc GetTestSuiteDescription {} { | ||||||||||||||||||||||||||||
| if {[info exists ::osvvm::TestSuiteDescription]} { | ||||||||||||||||||||||||||||
| return $::osvvm::TestSuiteDescription | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| return "" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
+1441
to
+1448
Member
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. If this is initialized in OsvvmSettingsRequired.tcl, then this simplifies to:
Suggested change
Member
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 am new to these modification things. I note that the above modification requires another action as well. |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # SetTestSuiteBrief | ||||||||||||||||||||||||||||
| # Sets a suite-level brief (plain text) for summary tables. | ||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||
| # Call this after TestSuite <name> and before the suite finishes. | ||||||||||||||||||||||||||||
| proc SetTestSuiteBrief {Brief} { | ||||||||||||||||||||||||||||
| if {![info exists ::osvvm::TestSuiteBriefMaxLength]} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestSuiteBriefMaxLength 120 | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| if {$::osvvm::TestSuiteBriefMaxLength > 0 && [string length $Brief] > $::osvvm::TestSuiteBriefMaxLength} { | ||||||||||||||||||||||||||||
| puts "Warning: SetTestSuiteBrief length ([string length $Brief]) exceeds TestSuiteBriefMaxLength ($::osvvm::TestSuiteBriefMaxLength)" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
+1456
to
+1461
Member
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. Any limits should be applied to the VHDL code so the user gets the information earlier. |
||||||||||||||||||||||||||||
| set ::osvvm::TestSuiteBrief $Brief | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # SetTestSuiteTitle | ||||||||||||||||||||||||||||
| # Sets a suite-level title (human-friendly) for reports. | ||||||||||||||||||||||||||||
| # The suite name remains the identifier. | ||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||
| # Call this after TestSuite <name> and before the suite finishes. | ||||||||||||||||||||||||||||
| proc SetTestSuiteTitle {Title} { | ||||||||||||||||||||||||||||
| if {![info exists ::osvvm::TestSuiteTitleMaxLength]} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestSuiteTitleMaxLength 80 | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| if {$::osvvm::TestSuiteTitleMaxLength > 0 && [string length $Title] > $::osvvm::TestSuiteTitleMaxLength} { | ||||||||||||||||||||||||||||
| puts "Warning: SetTestSuiteTitle length ([string length $Title]) exceeds TestSuiteTitleMaxLength ($::osvvm::TestSuiteTitleMaxLength)" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
+1472
to
+1477
Member
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. Any limits should be applied to the VHDL code so the user gets the information earlier. |
||||||||||||||||||||||||||||
| set ::osvvm::TestSuiteTitle $Title | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # ClearTestSuiteTitle | ||||||||||||||||||||||||||||
| # Clears any previously set suite-level title. | ||||||||||||||||||||||||||||
| proc ClearTestSuiteTitle {} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestSuiteTitle "" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # GetTestSuiteTitle | ||||||||||||||||||||||||||||
| # Returns the currently configured suite-level title. | ||||||||||||||||||||||||||||
| proc GetTestSuiteTitle {} { | ||||||||||||||||||||||||||||
| if {[info exists ::osvvm::TestSuiteTitle]} { | ||||||||||||||||||||||||||||
| return $::osvvm::TestSuiteTitle | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| return "" | ||||||||||||||||||||||||||||
|
Comment on lines
+1492
to
+1495
Member
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. Initialize TestSuiteTitle to "" in OsvvmSettingsRequired.tcl. Then simply return the value. Make sure it is set back to "" when the Build finishes or a new TestSuite is introduced.
Member
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. There are other places in OSVVM Tcl scripts that use info exists on variables - Iooking back I think that was a mistake and it should be initialized. |
||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # ClearTestSuiteBrief | ||||||||||||||||||||||||||||
| # Clears any previously set suite-level brief. | ||||||||||||||||||||||||||||
| proc ClearTestSuiteBrief {} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestSuiteBrief "" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # GetTestSuiteBrief | ||||||||||||||||||||||||||||
| # Returns the currently configured suite-level brief. | ||||||||||||||||||||||||||||
| proc GetTestSuiteBrief {} { | ||||||||||||||||||||||||||||
| if {[info exists ::osvvm::TestSuiteBrief]} { | ||||||||||||||||||||||||||||
| return $::osvvm::TestSuiteBrief | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| return "" | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
Comment on lines
+1498
to
+1513
Member
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. Structurally, keep this code with SetTestSuiteBrief |
||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| # Test Case Summary (HTML) Column Control | ||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||
| # These APIs control which columns are shown in the build HTML "<Suite> Test Case Summary" table. | ||||||||||||||||||||||||||||
| # Defaults: | ||||||||||||||||||||||||||||
| # - Generics: visible (all generics found in the suite) | ||||||||||||||||||||||||||||
| # - Tags: visible (all visible tags found in the suite) | ||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||
| # Notes: | ||||||||||||||||||||||||||||
| # - Calling SetTestCaseSummaryGenerics with no args clears the whitelist (show all). | ||||||||||||||||||||||||||||
| # - Calling SetTestCaseSummaryTags with no args clears the whitelist (show all tags found). | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| proc SetTestCaseSummaryGenerics {args} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestCaseSummaryShowGenerics 1 | ||||||||||||||||||||||||||||
| set ::osvvm::TestCaseSummaryGenericNames $args | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| proc HideTestCaseSummaryGenerics {} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestCaseSummaryShowGenerics 0 | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| proc SetTestCaseSummaryTags {args} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestCaseSummaryShowTags 1 | ||||||||||||||||||||||||||||
| set ::osvvm::TestCaseSummaryTagNames $args | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| proc HideTestCaseSummaryTags {} { | ||||||||||||||||||||||||||||
| set ::osvvm::TestCaseSummaryShowTags 0 | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| # ------------------------------------------------- | ||||||||||||||||||||||||||||
| proc TestName {Name} { | ||||||||||||||||||||||||||||
| variable TestCaseName | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
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.
Initialize TestSuiteDescription in OsvvmSettingsRequired.tcl