-
Notifications
You must be signed in to change notification settings - Fork 9
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
Makefiles #24
Draft
radonnachie
wants to merge
14
commits into
ghdl:master
Choose a base branch
from
radonnachie:makefiles
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Makefiles #24
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
801c45a
doc: grammatical hiccups
umarcor b2cefec
ci: use pytest
umarcor 3c79900
vhpidirect(arrays/intvector/vhdlsized): include stdio
umarcor d36171f
ci: use Action setup-ghdl
umarcor 1720993
ignore extra files
radonnachie 7147360
Create makefiles for intvector examples
radonnachie 398afaa
Symbols on 1 line
radonnachie 3e295f0
gitignore clean
radonnachie c6dae5c
test with makefile
radonnachie 82ce224
mkdir_rule, symbols per line
radonnachie 6910b7d
Remove unused TOPLEVEL, conditional assignments
radonnachie 0cf7353
Windows make calls
radonnachie 7e6edf1
README makefile section
radonnachie 7475acf
the d...
radonnachie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ghdl/vunit:llvm | ||
|
||
RUN apt update -qq \ | ||
&& apt install -y imagemagick \ | ||
&& python3 -m pip install pytest --progress-bar off |
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 |
---|---|---|
|
@@ -8,3 +8,6 @@ ent* | |
tb* | ||
!*.vhd | ||
!*.vhdl | ||
doc/_build | ||
.vunit_hash | ||
**/vunit_out/ |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
""" | ||
Verify that all example run scripts work correctly | ||
""" | ||
|
||
from sys import executable, platform | ||
from os import environ | ||
from pathlib import Path | ||
from subprocess import check_call | ||
import unittest | ||
import pytest | ||
|
||
|
||
class TestExamples(unittest.TestCase): | ||
""" | ||
Verify that example run scripts work correctly | ||
""" | ||
|
||
def setUp(self): | ||
self.shell = ['bash'] if platform == 'win32' else [] | ||
self.root = Path(__file__).parent | ||
self.vhpidirect = self.root / 'vhpidirect' | ||
self.vpi = self.root / 'vpi' | ||
|
||
def test_vhpidirect_quickstart_random(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'quickstart' / 'random' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_quickstart_math(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'quickstart' / 'math' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_quickstart_customc(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'quickstart' / 'customc' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_quickstart_wrapping_basic(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'quickstart' / 'wrapping' / 'basic' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_quickstart_wrapping_time(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'quickstart' / 'wrapping' / 'time' / 'run.sh')], shell=True) | ||
|
||
@unittest.skipUnless( | ||
platform != 'win32', | ||
"win: needs investigation, output of list-link seems to have wrong path format", | ||
) | ||
def test_vhpidirect_quickstart_linking_bind(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'quickstart' / 'linking' / 'bind' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_quickstart_package(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'quickstart' / 'package' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_quickstart_sharedvar(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'quickstart' / 'sharedvar' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_shared_shlib(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'shared' / 'shlib' / 'run.sh')], shell=True) | ||
|
||
@unittest.skipUnless( | ||
platform != 'win32', | ||
"win: dlfcn.h is not available on win", | ||
) | ||
def test_vhpidirect_shared_dlopen(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'shared' / 'dlopen' / 'run.sh')], shell=True) | ||
|
||
@unittest.skipUnless( | ||
platform != 'win32', | ||
"win: dlfcn.h is not available on win", | ||
) | ||
def test_vhpidirect_shared_shghdl(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'shared' / 'shghdl' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_arrays_intvector(self): | ||
# check_call(self.shell + [str(self.vhpidirect / 'arrays' / 'intvector' / 'run.sh')], shell=True) | ||
# check_call(self.shell + ['make', 'run'], shell=True, cwd=str(self.vhpidirect / 'arrays' / 'intvector')) | ||
check_call(['make', 'run'], shell=True, cwd=str(self.vhpidirect / 'arrays' / 'intvector')) | ||
|
||
|
||
def test_vhpidirect_arrays_logicvector(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'arrays' / 'logicvector' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_arrays_matrices(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'arrays' / 'matrices' / 'run.sh')], shell=True) | ||
|
||
def test_vhpidirect_arrays_matrices_vunit_axis_vcs(self): | ||
check_call([executable, str(self.vhpidirect / 'arrays' / 'matrices' / 'vunit_axis_vcs' / 'run.py')], shell=True) | ||
|
||
@unittest.skipUnless( | ||
platform != 'win32', | ||
"win: needs ImageMagick's 'convert'", | ||
) | ||
def test_vhpidirect_arrays_matrices_framebuffer(self): | ||
check_call(self.shell + [str(self.vhpidirect / 'arrays' / 'matrices' / 'framebuffer' / 'run.sh')], shell=True) | ||
|
||
def test_vpi_quickstart(self): | ||
check_call(self.shell + [str(self.vpi / 'quickstart' / 'run.sh')], shell=True) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The failure of this task might be legit. The
make
that is available in the PATH was not explicitly installed by us. It seems to be preinstalled from Chocolatey. We might investigate if we can make it work (e.g.check_call(['make', 'run'], shell=True, cwd=str(self.vhpidirect / 'arrays' / 'intvector'))
) or whether we need to useeine/setup-msys2
here too.I'd say that v0.37 windows releases of GHDL do require a MINGW environment. However, it has been surprising for me that just extracting the zipfile was working fine until now. Maybe GHDL was picking the MINGW libs of Git for Windows, which is installed by default.
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.
Glad to see it worked. It would have been a pain to fix win-stable otherwise...