Skip to content
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

Cleanup the SystemC tests and get macOS CI passing again #558

Merged
merged 4 commits into from
May 26, 2023

Conversation

quark17
Copy link
Collaborator

@quark17 quark17 commented May 26, 2023

This fixes #557. It cleans up the test suite infrastructure around SystemC tests and adds a new option TEST_SYSTEMC_CXXFLAGS, which allows the macOS CI to pass -std=c++11 to those tests. It also adds documentation to the test suite README about this new option and a few others that weren't mentioned.

If CXX is not set in the environment, use "c++" and not "g++".
And include CXXFLAGS on the command line, if set.  BSC also looks
for BSC_CXXFLAGS, but we don't replicate that in the testsuite.
In the tests for BSC's capability to generate SystemC wrappers, some
old tests were manually setting BSC's flags to specify SystemC.
Update them to use procedures in the testsuite infrastructure, that
abstarct the details in one place (where it will be easier to make
changes to the flags, if needed).
And use it to get the SystemC tests passing on macOS, now that the
SystemC library installed by Homebrew requires a flag to the C++ compiler.

Also, cleanup how the SystemC flags are received in the testsuite.
The testsuite has "which_*" procedures for getting the location of
executables and "get_*" procedures for getting other values -- the
SYSTEMC_INC and SYSTEMC_LIB variables were incorrectly using "which_*".
The testsuite requires that these be set (if SystemC tests are enabled)
and they can be expected to exist as variables, so there's no need for
"get_*" functions for them; instead the functionality is bundled into
a single function that is called at the start and that installs the
values into global values -- in the same way that "get_test_options"
does for "vtest" etc (and the SystemC options could eventually be
bundled in with that).  The SystemC test procedures can also assume
that the values exist, so conditional code to check for that is removed.
@quark17 quark17 merged commit f00bb4a into B-Lang-org:main May 26, 2023
@quark17 quark17 deleted the macos-systemc branch May 26, 2023 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SystemC 2.3.4 needs to be compiled with -std=c++11
1 participant