Skip to content

Commit 5c8f4d0

Browse files
committed
Added GenerateOsvvmReports
1 parent ae74fd8 commit 5c8f4d0

2 files changed

Lines changed: 35 additions & 18 deletions

File tree

OsvvmScriptsCore.tcl

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -401,27 +401,36 @@ proc build {{Path_Or_File "."} args} {
401401
CheckSimulationDirs ; ##?? Creates ReportsDirectory for builds that fail. Refactor later.
402402
}
403403

404-
set ReportYamlErrorCode [catch {FinishBuildYaml $BuildName} BuildYamlErrMsg]
405-
set LocalBuildYamlErrorInfo $::errorInfo
406-
if {($ReportYamlErrorCode != 0) && ($::osvvm::TclDebug || $::osvvm::Debug)} {
407-
# No prior call back, only depends on opening file that has already been opened
408-
puts "FinishBuildYaml \$LocalBuildYamlErrorInfo: $::errorInfo"
409-
}
404+
if {$::osvvm::GenerateOsvvmReports} {
405+
set ReportYamlErrorCode [catch {FinishBuildYaml $BuildName} BuildYamlErrMsg]
406+
set LocalBuildYamlErrorInfo $::errorInfo
407+
if {($ReportYamlErrorCode != 0) && ($::osvvm::TclDebug || $::osvvm::Debug)} {
408+
# No prior call back, only depends on opening file that has already been opened
409+
puts "FinishBuildYaml \$LocalBuildYamlErrorInfo: $::errorInfo"
410+
}
410411

411-
# Try to create reports, even if the build failed
412-
set ReportErrorCode [catch {AfterBuildReports $BuildName} ReportsErrMsg]
413-
set LocalReportErrorInfo $::errorInfo
412+
# Try to create reports, even if the build failed
413+
set ReportErrorCode [catch {AfterBuildReports $BuildName} ReportsErrMsg]
414+
set LocalReportErrorInfo $::errorInfo
415+
} else {
416+
set ReportYamlErrorCode 0
417+
set ReportErrorCode 0
418+
}
414419

415420
StopTranscript ${BuildName}
416421

417422
set BuildStarted "false"
418423

419-
# Cannot generate html log files until transcript is closed - previous step
420-
set Log2ErrorCode [catch {Log2Osvvm $::osvvm::TranscriptFileName} ReportsErrMsg]
421-
set Log2ErrorInfo $::errorInfo
422-
423-
WriteIndexYaml $BuildName
424-
Index2Html
424+
if {$::osvvm::GenerateOsvvmReports} {
425+
# Cannot generate html log files until transcript is closed - previous step
426+
set Log2ErrorCode [catch {Log2Osvvm $::osvvm::TranscriptFileName} ReportsErrMsg]
427+
set Log2ErrorInfo $::errorInfo
428+
429+
WriteIndexYaml $BuildName
430+
Index2Html
431+
} else {
432+
set Log2ErrorCode 0
433+
}
425434

426435
set BuildName ""
427436
set ::osvvm::HaveNotCreatedBuildOutputDirectory "true"
@@ -464,7 +473,9 @@ proc LocalBuild {Path_Or_File args} {
464473
puts "" ; # ensure that the next print is at the start of a line
465474
puts "build $Path_Or_File" ; # EchoOsvvmCmd
466475

467-
StartBuildYaml
476+
if {$::osvvm::GenerateOsvvmReports} {
477+
StartBuildYaml
478+
}
468479

469480
CallbackBefore_Build ${Path_Or_File}
470481
LocalInclude ${Path_Or_File} {*}$args
@@ -1198,8 +1209,12 @@ proc simulate {LibraryUnit args} {
11981209
unset vendor_simulate_started
11991210
}
12001211

1201-
set ReportErrorCode [catch {AfterSimulateReports} ReportErrMsg]
1202-
set LocalReportErrorInfo $::errorInfo
1212+
if {$::osvvm::GenerateOsvvmReports} {
1213+
set ReportErrorCode [catch {AfterSimulateReports} ReportErrMsg]
1214+
set LocalReportErrorInfo $::errorInfo
1215+
} else {
1216+
set ReportErrorCode 0
1217+
}
12031218

12041219
# Reset Temporary Settings
12051220
if {[info exists ::osvvm::TestCaseName]} {

OsvvmSettingsDefault.tcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ namespace eval ::osvvm {
111111
if {![info exists FailOnEmptyTestSuite]} {
112112
variable FailOnEmptyTestSuite "true"
113113
}
114+
variable GenerateOsvvmReports "true"
115+
114116
#
115117
# Stop Counts for Failures seen by Analyze and Simulate
116118
# Value 0 is special to mean, don't stop

0 commit comments

Comments
 (0)