-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GHC version to Bluetcl, for use in testsuite
The Bluetcl 'version' command now has a 'ghc' subcommand that will print the version of GHC that the Bluespec tools were compiled with. The subcommand 'bsc' was also added, which has the same behavior as calling 'version' with no arguments: prints the Bluespec tools version. The auotmated printing of help messages needed to be updated to work for commands with optional subcommands like this. The testsuite now has a variable 'ghc_version' which can be consulted. The tests for bug 1490 are updated to use this, because BSC compiled with GHC 9.8.1 has regressions that need to be handled differently. The regexp for assigning 'bsc_version' in the testsuite was broken and was assigning it multiple lines of text (which caused confusion when printed in the log). Instead of fixing the regexp, the getting of the version is changed to use Bluetcl, to print just the version info.
- Loading branch information
Showing
3 changed files
with
76 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,36 @@ | ||
|
||
set rtsflags {+RTS -M256M -Sstderr -RTS} | ||
|
||
# GHC 9.8.1 has regressions | ||
set is_ghc_9_8 [ expr [regexp {^\d+\.\d+} $ghc_version majmin] && \ | ||
$majmin == "9.8" ] | ||
set rtsflags_9_8 {+RTS -M265M -Sstderr -RTS} | ||
|
||
proc compile_verilog_pass_except { filename except rtsflags rtsflags_except} { | ||
if { $except } { | ||
compile_verilog_fail $filename {} $rtsflags | ||
copy [make_bsc_vcomp_output_name $filename] \ | ||
[make_bsc_vcomp_output_name $filename.try1] | ||
compile_verilog_pass $filename {} $rtsflags_except | ||
} else { | ||
compile_verilog_pass $filename {} $rtsflags | ||
} | ||
} | ||
|
||
# ----- | ||
|
||
compile_verilog_pass Bug1490Bool.bsv "" "+RTS -M256M -Sstderr -RTS" | ||
compile_verilog_pass Bug1490MyBool.bsv "" "+RTS -M256M -Sstderr -RTS" | ||
compile_verilog_pass Bug1490MyUnion.bsv "" "+RTS -M256M -Sstderr -RTS" | ||
compile_verilog_pass Bug1490MyEnum.bsv "" "+RTS -M256M -Sstderr -RTS" | ||
compile_verilog_pass Bug1490Bool.bsv {} $rtsflags | ||
compile_verilog_pass Bug1490MyBool.bsv {} $rtsflags | ||
compile_verilog_pass_except Bug1490MyUnion.bsv $is_ghc_9_8 $rtsflags $rtsflags_9_8 | ||
compile_verilog_pass Bug1490MyEnum.bsv {} $rtsflags | ||
|
||
# ----- | ||
|
||
# There has been a regression and this example now exhausts the heap | ||
compile_verilog_fail VsortOriginal.bsv "" "+RTS -M256M -Sstderr -RTS" | ||
compile_verilog_fail VsortOriginal.bsv {} $rtsflags | ||
# Confirm that the test failed in the way we expect | ||
find_n_strings [make_bsc_vcomp_output_name VsortOriginal.bsv] "Heap exhausted" 1 | ||
|
||
compile_verilog_pass VsortWorkaround.bsv "" "+RTS -M256M -Sstderr -RTS" | ||
compile_verilog_pass_except VsortWorkaround.bsv $is_ghc_9_8 $rtsflags $rtsflags_9_8 | ||
|
||
# ----- |
This file contains 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