Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 101 additions & 2 deletions CssOsvvmStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ body {
header {
}

main {
/* main {
max-width: 1200px;
}
} */

footer {
}
Expand Down Expand Up @@ -138,6 +138,18 @@ table, th, td {
}

table.testsuite-summary-table {
table-layout: auto;
}

/* Keep displayed suite title/name on one line in the Test Suite Summary table */
table.testsuite-summary-table th:first-child,
table.testsuite-summary-table td:first-child {
/* width: 1%; */
white-space: nowrap;
}

table.testsuite-summary-table td:first-child a {
white-space: nowrap;
}

table.testsuite-details-table {
Expand Down Expand Up @@ -203,10 +215,97 @@ tfoot {
text-align: right;
}

/* Datatype badges (used for Type columns: string/integer/boolean) */
.datatype {
display: inline-block;
white-space: nowrap;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
font-size: 0.95em;
padding: 0px 0.35em;
border: 1px solid #CCCCCC;
background-color: #f8f8f8;
border-radius: 3px;
}

summary > b {
font-weight: bold;
}

/* Per-suite Test Case Summary heading: emphasize suite name, de-emphasize suffix */
summary.suite-testcase-summary-heading {
font-weight: bold;
}

summary.suite-testcase-summary-heading .suite-name {
font-weight: bold;
}

summary.suite-testcase-summary-heading .suite-sep {
font-weight: bold;
}

summary.suite-testcase-summary-heading .suite-suffix {
font-weight: bold;
font-style: italic;
font-size: 0.95em;
}

/* Per-testcase report sections: "<test title> — Summary/Description/Tags/Generics" */
summary.testcase-section-heading {
font-weight: bold;
}

summary.testcase-section-heading .tc-name {
font-weight: bold;
}

summary.testcase-section-heading .tc-sep {
font-weight: bold;
}

summary.testcase-section-heading .tc-suffix {
font-weight: bold;
font-style: italic;
font-size: 0.95em;
}

/* Section titles that are not <summary> (e.g. h2 Alert Report) */
h2.testcase-section-title {
font-weight: bold;
}

h2.testcase-section-title .tc-name {
font-weight: bold;
}

h2.testcase-section-title .tc-sep {
font-weight: bold;
}

h2.testcase-section-title .tc-suffix {
font-weight: bold;
font-style: italic;
font-size: 0.95em;
}

/* Keep displayed test title/name on one line in the Test Case Summary table */
table.testcase-summary-table {
table-layout: auto;
display: inline-table;
width: auto;
max-width: 100%;
}

table.testcase-summary-table th:first-child,
table.testcase-summary-table td:first-child {
/* width: 1%; */
white-space: nowrap;
}

table.testcase-summary-table td:first-child a {
white-space: nowrap;
}

/* #logo {
width: 100%;
}*/
128 changes: 126 additions & 2 deletions OsvvmScriptsCore.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
}


Expand Down Expand Up @@ -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 ""
}

# -------------------------------------------------
# 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)"
}
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)"
}
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 ""
}

# -------------------------------------------------
# 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 ""
}

# -------------------------------------------------
# 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
Expand Down
Loading