-
Notifications
You must be signed in to change notification settings - Fork 352
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
Skip some tests if gcc is not installed #1510
Changes from all commits
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 |
---|---|---|
|
@@ -7,10 +7,13 @@ elab mytestbench | |
|
||
simulate mytestbench --wave=dump.ghw | tee mytestbench.out | ||
|
||
gcc ../../../src/grt/ghwdump.c ../../../src/grt/ghwlib.c -I../../../src/grt/ -o ghwdump | ||
if c_compiler_is_available; then | ||
|
||
# We're just checking that ghwdump doesn't crash on a zero length signal. | ||
./ghwdump -ths dump.ghw > dump.txt | ||
gcc ../../../src/grt/ghwdump.c ../../../src/grt/ghwlib.c -I../../../src/grt/ -o ghwdump | ||
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. BTW, maybe use |
||
|
||
# We're just checking that ghwdump doesn't crash on a zero length signal. | ||
./ghwdump -ths dump.ghw > dump.txt | ||
fi | ||
|
||
rm -f mytestbench.out ghwdump dump.txt dump.ghw | ||
clean | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,6 +148,15 @@ synth_tb() | |
clean | ||
} | ||
|
||
# Check if a C compiler is installed on this system | ||
c_compiler_is_available () | ||
{ | ||
if [ -z $CC ]; then | ||
CC="gcc" | ||
fi | ||
which $CC | ||
} | ||
|
||
# Check if a feature is present | ||
ghdl_has_feature () | ||
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. Might be worth calling |
||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
analyze mydesign.vhdl | ||
elab myentity | ||
|
||
if ghdl_has_feature myentity vpi; then | ||
if c_compiler_is_available && ghdl_has_feature myentity vpi; then | ||
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. Instead of skipping each vpi test, I would skip the whole (sub)testsuite at the top of https://github.com/LukasVik/ghdl/blob/testsuite_gcc/testsuite/vpi/testsuite.sh |
||
$GHDL --vpi-compile -v gcc -c vpi1.c | ||
$GHDL --vpi-link -v gcc -o vpi1.vpi vpi1.o | ||
|
||
|
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.
Please, echo a message and
exit 0
, instead of wrapping all the commands. See https://github.com/ghdl/ghdl/blob/master/testsuite/gna/bug032/testsuite.sh#L3-L7